Skip to content

Commit 92b6700

Browse files
authored
ci: only render gocd pipelines if relevant files are changed (#2376)
1 parent b5ce7a4 commit 92b6700

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

.github/workflows/validate-pipelines.yml

+16-14
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,6 @@ on:
99
pull_request:
1010

1111
jobs:
12-
render:
13-
name: Render GoCD Pipelines with Jsonnet
14-
runs-on: ubuntu-latest
15-
steps:
16-
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
17-
- uses: getsentry/action-gocd-jsonnet@v1
18-
with:
19-
jb-install: true
20-
check-for-changes: true
21-
convert-to-yaml: true
22-
jsonnet-dir: gocd/templates
23-
generated-dir: gocd/generated-pipelines
24-
render-as-single-file: false
25-
2612
files-changed:
2713
name: files-changed
2814
runs-on: ubuntu-latest
@@ -40,6 +26,22 @@ jobs:
4026
- 'gocd/**'
4127
- '.github/workflows/validate-pipelines.yml'
4228
29+
render:
30+
if: needs.files-changed.outputs.gocd == 'true'
31+
needs: files-changed
32+
name: Render GoCD Pipelines with Jsonnet
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
36+
- uses: getsentry/action-gocd-jsonnet@v1
37+
with:
38+
jb-install: true
39+
check-for-changes: true
40+
convert-to-yaml: true
41+
jsonnet-dir: gocd/templates
42+
generated-dir: gocd/generated-pipelines
43+
render-as-single-file: false
44+
4345
validate:
4446
if: needs.files-changed.outputs.gocd == 'true'
4547
needs: files-changed

0 commit comments

Comments
 (0)