-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (47 loc) · 1.19 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
name: Validation
run-name: validating → ${{ github.event.pull_request.tile }} by @${{ github.actor }}
on: pull_request
jobs:
changes:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
changes: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
changes:
- '**/*.go'
- '**/go.mod'
- 'go.work'
lint:
needs: changes
if: ${{ needs.changes.outputs.changes == 'true' }}
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- uses: actions/checkout@v3
- uses: extractions/setup-just@v1
- uses: actions/setup-go@v4
with:
go-version-file: go.work
- run: just lint
test:
needs: changes
if: ${{ needs.changes.outputs.changes == 'true' }}
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- uses: actions/checkout@v3
- uses: extractions/setup-just@v1
- uses: actions/setup-go@v4
with:
go-version-file: go.work
- run: just test