@@ -27,62 +27,66 @@ jobs:
27
27
files_changed :
28
28
name : Determine files changed
29
29
needs : lint
30
- # continue-on-error: true # Uncomment once integration is finished
31
30
runs-on : ubuntu-latest
32
- # Map a step output to a job output
31
+ # Map a step output to a job output, this allows other jobs to be gated on the filter results
33
32
outputs :
34
- should_skip : ${{ steps.skip_check.outputs.should_skip }}
35
- paths_result : ${{ steps.skip_check.outputs.paths_result }}
33
+ extra_push : ${{ steps.filter.outputs.extra_push }}
34
+ extra_pull_request : ${{ steps.filter.outputs.extra_pull_request }}
35
+ stackhpc : ${{ steps.filter.outputs.stackhpc }}
36
+ trivvyscan : ${{ steps.filter.outputs.trivvyscan }}
36
37
steps :
37
- - name : Build paths result
38
- id : skip_check
39
- # For security we use the commit of fkirc/skip-duplicate-actions@v5
40
- uses : fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf
38
+ - name : Checkout
39
+ uses : actions/checkout@v4
40
+
41
+ - name : Paths Filter
42
+ # For safety using commit of dorny/paths-filter@v3
43
+ uses : dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
44
+ id : filter
41
45
with :
42
- cancel_others : true
43
- skip_after_successful_duplicate : false
44
- # do_not_skip: '[ "pull_request", "push", "workflow_dispatch" ]'
45
- paths_filter : |
46
+ list-files : ' json'
47
+ filters : |
46
48
extra_push:
47
- paths:
48
- - 'environments/.stackhpc/tofu/cluster_image.auto.tfvars.json'
49
- - 'ansible/roles/doca/**'
50
- - 'ansible/roles/cuda/**'
51
- - 'ansible/roles/slurm_recompile/**' # runs on cuda group
52
- - 'ansible/roles/lustre/**'
53
- - '.github/workflows/extra.yml'
49
+ - 'environments/.stackhpc/tofu/cluster_image.auto.tfvars.json'
50
+ - 'ansible/roles/doca/**'
51
+ - 'ansible/roles/cuda/**'
52
+ - 'ansible/roles/slurm_recompile/**' # runs on cuda group
53
+ - 'ansible/roles/lustre/**'
54
+ - '.github/workflows/extra.yml'
54
55
extra_pull_request:
55
- paths:
56
- - 'environments/.stackhpc/tofu/cluster_image.auto.tfvars.json'
57
- - 'ansible/roles/doca/**'
58
- - 'ansible/roles/cuda/**'
59
- - 'ansible/roles/lustre/**'
60
- - '.github/workflows/extra.yml'
56
+ - 'environments/.stackhpc/tofu/cluster_image.auto.tfvars.json'
57
+ - 'ansible/roles/doca/**'
58
+ - 'ansible/roles/cuda/**'
59
+ - 'ansible/roles/lustre/**'
60
+ - '.github/workflows/extra.yml'
61
61
stackhpc:
62
- paths:
63
- - '**'
64
- - '!dev/**'
65
- - 'dev/setup-env.sh'
66
- - '!docs/**'
67
- - '!README.md'
68
- - '!.gitignore'
69
- - '!.github/workflows/'
70
- - '.github/workflows/stackhpc'
62
+ - '**'
63
+ - '!dev/**'
64
+ - 'dev/setup-env.sh'
65
+ - '!docs/**'
66
+ - '!README.md'
67
+ - '!.gitignore'
68
+ - '!.github/workflows/'
69
+ - '.github/workflows/stackhpc'
71
70
trivvyscan:
72
- paths:
73
- - 'environments/.stackhpc/tofu/cluster_image.auto.tfvars.json'
74
- - name : Echo paths result
71
+ - 'environments/.stackhpc/tofu/cluster_image.auto.tfvars.json'
72
+
73
+ - name : Paths Filter Result
75
74
run : >
76
- echo '${{ steps.skip_check.outputs.paths_result }}'
77
- | jq -r '.'
75
+ echo 'extra_push: ${{ steps.filter.outputs.extra_push }}' | jq -r '.'
76
+ echo 'extra_pull_request: ${{ steps.filter.outputs.extra_pull_request }}' | jq -r '.'
77
+ echo 'stackhpc: ${{ steps.filter.outputs.stackhpc }}' | jq -r '.'
78
+ echo 'trivvyscan: ${{ steps.filter.outputs.trivvyscan }}' | jq -r '.'
78
79
79
80
extra :
80
81
name : Test extra build
81
82
needs : files_changed
83
+ # if: |
84
+ # needs.files_changed.outputs.should_skip != 'true' &&
85
+ # (( github.event_name != 'pull_request' && !fromJSON(needs.files_changed.outputs.paths_result).extra_push.should_skip ) ||
86
+ # ( github.event_name == 'pull_request' && !fromJSON(needs.files_changed.outputs.paths_result).extra_pull_request.should_skip ))
82
87
if : |
83
- needs.files_changed.outputs.should_skip != 'true' &&
84
- (( github.event_name == 'pull_request' && !fromJSON(needs.files_changed.outputs.paths_result).extra_push.should_skip ) ||
85
- ( github.event_name == 'pull_request' && !fromJSON(needs.files_changed.outputs.paths_result).extra_pull_request.should_skip ))
88
+ github.event_name != 'pull_request' && needs.files_changed.outputs.extra_push == 'true' ||
89
+ github.event_name == 'pull_request' && needs.files_changed.outputs.extra_pull_request == 'true'
86
90
# uses: ./.github/workflows/extra.yml
87
91
steps : # TEST
88
92
- name : Test extra build...
95
99
stackhpc :
96
100
name : Test deployment and reimage on OpenStack
97
101
needs : files_changed
102
+ # if: |
103
+ # needs.files_changed.outputs.should_skip != 'true' && !fromJSON(needs.files_changed.outputs.paths_result).stackhpc.should_skip
98
104
if : |
99
- needs.files_changed.outputs.should_skip != 'true' && !fromJSON(needs.files_changed.outputs.paths_result).stackhpc.should_skip
105
+ needs.files_changed.outputs.stackhpc == 'true'
100
106
# uses: ./.github/workflows/stackhpc.yml
101
107
steps : # TEST
102
108
- name : Test deployment and reimage on OpenStack...
@@ -109,9 +115,12 @@ jobs:
109
115
trivvyscan :
110
116
name : Trivy scan image for vulnerabilities
111
117
needs : files_changed
118
+ # if: |
119
+ # github.event_name == 'pull_request' &&
120
+ # needs.files_changed.outputs.should_skip != 'true' && !fromJSON(needs.files_changed.outputs.paths_result).trivvyscan.should_skip
112
121
if : |
113
122
github.event_name == 'pull_request' &&
114
- needs.files_changed.outputs.should_skip != 'true' && !fromJSON(needs.files_changed.outputs.paths_result).trivvyscan.should_skip
123
+ needs.files_changed.outputs.trivvyscan == 'true'
115
124
# uses: ./.github/workflows/trivvyscan.yml
116
125
steps : # TEST
117
126
- name : Trivy scan image for vulnerabilities...
0 commit comments