-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (49 loc) · 1.31 KB
/
main.yaml
File metadata and controls
56 lines (49 loc) · 1.31 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
# This is the main "router" for all GH workflows.
# It call the right action depending of files being changed in the PR.
name: main
on:
pull_request:
jobs:
# Detect changes
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
# Set job outputs to values from changes step
outputs:
go: ${{ steps.changes.outputs.go }}
image: ${{ steps.changes.outputs.image }}
markdown: ${{ steps.changes.outputs.markdown }}
steps:
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
go:
- 'go.*'
- '*.go'
- 'internal/**'
image:
- 'go.*'
- '*.go'
- 'internal/**'
- 'Dockerfile'
- 'Makefile'
markdown:
- '**/*.md'
- '.github/**/*.md'
go:
needs: changes
if: ${{ needs.changes.outputs.go == 'true' }}
uses: ./.github/workflows/go-test.yaml
image:
needs: changes
if: ${{ needs.changes.outputs.image == 'true' }}
permissions:
contents: read
packages: write
uses: ./.github/workflows/build-images.yaml
markdown:
needs: changes
if: ${{ needs.changes.outputs.markdown == 'true' }}
uses: ./.github/workflows/markdown-lint.yaml