-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (56 loc) · 1.49 KB
/
Copy pathpull-request.yaml
File metadata and controls
60 lines (56 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Check and test
env:
IMAGE_NAME: nbe95/apigator
on:
pull_request:
types:
- labeled
- unlabeled
- opened
- reopened
- synchronize
- ready_for_review
jobs:
validate-release:
name: Validate pull request
runs-on: ubuntu-latest
if: github.base_ref == 'main'
outputs:
sha: ${{ steps.commit.outputs.sha }}
sha_short: ${{ steps.commit.outputs.sha_short }}
steps:
- uses: actions/checkout@v7
- name: Get commit data
id: commit
run: |
echo "sha=${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT
echo "sha_short=$(git rev-parse --short "${{ github.event.pull_request.head.sha }}")" >> $GITHUB_OUTPUT
- uses: jefflinse/pr-semver-bump@v1.7.4
name: Bump and tag new version
with:
mode: validate
repo-token: ${{ secrets.GITHUB_TOKEN }}
major-label: major
minor-label: minor
patch-label: patch
noop-labels: ""
require-release-notes: false
base-branch: true
with-v: false
check:
name: Lint and check code
runs-on: ubuntu-latest
needs:
- validate-release
steps:
- uses: actions/checkout@v7
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
pdm sync -d
- name: Run linter and type checker
run: |
pdm run check