-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (52 loc) · 1.59 KB
/
pr_validation.workflow.yaml
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
name: Validation
run-name: validating → ${{ github.event.pull_request.tile }} by @${{ github.actor }}
on: pull_request
# Ensures that only one task per branch/environment will run at a time.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- id: changes
uses: ./.github/actions/detect-changes
- if: steps.changes.outputs.go == 'true'
uses: ./.github/actions/setup-repo
- if: steps.changes.outputs.go == 'true'
run: just lint
test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- id: changes
uses: ./.github/actions/detect-changes
- if: steps.changes.outputs.go == 'true'
uses: ./.github/actions/setup-repo
- if: steps.changes.outputs.go == 'true'
run: just test
generate:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- id: changes
uses: ./.github/actions/detect-changes
# with:
# commit-bot-perms: 'true'
- if: steps.changes.outputs.go == 'true'
uses: ./.github/actions/setup-repo
- if: steps.changes.outputs.go == 'true'
run: just fix
- if: steps.changes.outputs.go == 'true'
run: just generate
- if: steps.changes.outputs.go == 'true'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "[AutoCommit] auto generate"