@@ -29,12 +29,12 @@ jobs:
2929 ui : ${{ steps.changed-files.outputs.ui_any_modified == 'true' }}
3030 runs-on : ubuntu-latest
3131 steps :
32- - uses : actions/checkout@v4
32+ - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3333 with :
3434 fetch-depth : 50 # assume PRs are less than 50 commits
3535 - name : Get relevant files changed per group
3636 id : changed-files
37- uses : tj-actions/changed-files@v40
37+ uses : tj-actions/changed-files@cbda684547adc8c052d50711417fa61b428a9f88 # v41.1.2
3838 with :
3939 files_yaml : |
4040 common: &common
5757 e2e-tests:
5858 - *tests
5959 # plus manifests and SDKs that are used in E2E tests
60+ - Dockerfile
6061 - manifests/**
6162 - sdks/**
6263 codegen:
7374 - pkg/**
7475 - cmd/**
7576 - examples/** # examples are used within the fields lists
77+ - manifests/** # a few of these are generated and committed
7678 # generation scripts
7779 - hack/cli/**
7880 - hack/jsonschema/**
8890 - *tests
8991 # plus lint config
9092 - .golangci.yml
93+ # all GH workflows / actions
94+ - .github/workflows/**
9195 # docs files below
9296 - docs/**
9397 # generated files are covered by codegen
@@ -111,8 +115,8 @@ jobs:
111115 runs-on : ubuntu-latest
112116 timeout-minutes : 10
113117 steps :
114- - uses : actions/checkout@v4
115- - uses : actions/setup-go@v4
118+ - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
119+ - uses : actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
116120 with :
117121 go-version : " 1.21"
118122 cache : true
@@ -122,33 +126,40 @@ jobs:
122126 if : github.ref == 'refs/heads/main'
123127 run : bash <(curl -s https://codecov.io/bash)
124128
125- argoexec-image :
126- name : argoexec-image
129+ argo-images :
130+ name : argo-images
127131 # needs: [ lint ]
128132 runs-on : ubuntu-latest
129133 timeout-minutes : 10
134+ strategy :
135+ fail-fast : false
136+ matrix :
137+ include :
138+ - image : argoexec
139+ - image : argocli
130140 steps :
131- - uses : actions/checkout@v4
132- - uses : docker/setup-buildx-action@v3
141+ - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
142+ - uses : docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
133143 - name : Build and export
134- uses : docker/build-push-action@v5
144+ uses : docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
135145 with :
136146 context : .
137- tags : quay.io/argoproj/argoexec :latest
138- outputs : type=docker,dest=/tmp/argoexec_image .tar
139- target : argoexec
147+ tags : quay.io/argoproj/${{matrix.image}} :latest
148+ outputs : type=docker,dest=/tmp/${{matrix.image}}_image .tar
149+ target : ${{matrix.image}}
140150 cache-from : type=gha
141151 cache-to : type=gha,mode=max
142152 - name : Upload
143- uses : actions/upload-artifact@v4
153+ uses : actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
144154 with :
145- name : argoexec
146- path : /tmp/argoexec_image .tar
155+ name : ${{matrix.image}}_image.tar
156+ path : /tmp/${{matrix.image}}_image .tar
147157 if-no-files-found : error
148158
149159 e2e-tests :
150160 name : E2E Tests
151- needs : [ argoexec-image ]
161+ needs : [ changed-files, argo-images ]
162+ if : ${{ needs.changed-files.outputs.e2e-tests == 'true' }}
152163 runs-on : ubuntu-latest
153164 timeout-minutes : 30
154165 env :
@@ -190,21 +201,21 @@ jobs:
190201 steps :
191202 - name : Install socat (needed by Kubernetes v1.25)
192203 run : sudo apt-get -y install socat
193- - uses : actions/checkout@v4
194- - uses : actions/setup-go@v4
204+ - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
205+ - uses : actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
195206 with :
196207 go-version : " 1.21"
197208 cache : true
198209 - name : Install Java for the SDK
199210 if : ${{matrix.test == 'test-java-sdk'}}
200- uses : actions/setup-java@v4
211+ uses : actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
201212 with :
202213 java-version : ' 8'
203214 distribution : adopt
204215 cache : maven
205216 - name : Install Python for the SDK
206217 if : ${{matrix.test == 'test-python-sdk'}}
207- uses : actions/setup-python@v5
218+ uses : actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
208219 with :
209220 python-version : ' 3.x'
210221 cache : pip
@@ -222,13 +233,16 @@ jobs:
222233 echo " user:" >> $KUBECONFIG
223234 echo " token: xxxxxx" >> $KUBECONFIG
224235 until kubectl cluster-info ; do sleep 10s ; done
225- - name : Download argoexec image
226- uses : actions/download-artifact@v4
236+ - name : Download images
237+ uses : actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
227238 with :
228- name : argoexec
239+ pattern : ' *_image.tar '
229240 path : /tmp
230- - name : Load argoexec image
231- run : docker load < /tmp/argoexec_image.tar
241+ - name : Load images
242+ run : |
243+ set -eux
244+ docker load < /tmp/argoexec_image.tar/argoexec_image.tar
245+ docker load < /tmp/argocli_image.tar/argocli_image.tar
232246 - name : Set-up /etc/hosts
233247 run : |
234248 echo '127.0.0.1 dex' | sudo tee -a /etc/hosts
@@ -295,8 +309,8 @@ jobs:
295309 env :
296310 GOPATH : /home/runner/go
297311 steps :
298- - uses : actions/checkout@v4
299- - uses : actions/setup-go@v4
312+ - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
313+ - uses : actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
300314 with :
301315 go-version : " 1.21"
302316 cache : true
@@ -331,15 +345,18 @@ jobs:
331345 env :
332346 GOPATH : /home/runner/go
333347 steps :
334- - uses : actions/checkout@v4
335- - uses : actions/setup-go@v4
348+ - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
349+ - uses : actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
336350 with :
337351 go-version : " 1.21"
338352 cache : true
339353 - run : make lint STATIC_FILES=false
340354 # if lint makes changes that are not in the PR, fail the build
341355 - name : Check if lint made changes not present in the PR
342356 run : git diff --exit-code
357+ # lint GH Actions
358+ - name : Ensure GH Actions are pinned to SHAs
359+ uses : zgosalvez/github-actions-ensure-sha-pinned-actions@ba37328d4ea95eaf8b3bd6c6cef308f709a5f2ec # v3.0.3
343360
344361 ui :
345362 name : UI
@@ -348,8 +365,8 @@ jobs:
348365 env :
349366 NODE_OPTIONS : --max-old-space-size=4096
350367 steps :
351- - uses : actions/checkout@v4
352- - uses : actions/setup-node@v4
368+ - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
369+ - uses : actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
353370 with :
354371 node-version : " 20" # change in all GH Workflows
355372 cache : yarn
0 commit comments