2020 # Expose matched filters as job 'images' output variable
2121 images : ${{ steps.filter.outputs.changes }}
2222 steps :
23- - uses : actions/checkout@v4
23+ - uses : actions/checkout@v5
2424
2525 - name : Determine Paths to Build for Auto Trigger
2626 uses : dorny/paths-filter@v3
@@ -113,7 +113,7 @@ jobs:
113113 runs-on : ubuntu-latest
114114 steps :
115115 - name : Checkout code
116- uses : actions/checkout@v4
116+ uses : actions/checkout@v5
117117
118118 - name : Get build parameters
119119 shell : bash
@@ -146,7 +146,7 @@ jobs:
146146 runs-on : [self-hosted, multi-arch]
147147 steps :
148148 - name : Checkout code
149- uses : actions/checkout@v4
149+ uses : actions/checkout@v5
150150
151151 - name : Get build parameters
152152 shell : bash
@@ -168,87 +168,4 @@ jobs:
168168 run-test-stage : ${{ env.run-test-stage }}
169169 test-entrypoint : ${{ env.test-entrypoint }}
170170 dockerhub-username : ${{ secrets.CONTAINER_REGISTRY_USERNAME }}
171- dockerhub-password : ${{ secrets.CONTAINER_DESCRIPTION_PASSWORD }}
172-
173- # Job to run change detection
174- self-hosted-changes :
175- if : ${{ github.event_name != 'workflow_dispatch' }}
176- runs-on : [self-hosted, multi-arch]
177- outputs :
178- images : ${{ steps.self-hosted-filter.outputs.changes }}
179- steps :
180- - uses : actions/checkout@v4
181-
182- - uses : dorny/paths-filter@v3
183- id : self-hosted-filter
184- with :
185- base : ${{ github.ref }}
186- filters : |
187- buildpack-deps/ubuntu/jammy: 'buildpack-deps/ubuntu/jammy/**'
188- buildpack-deps/ubuntu/noble: 'buildpack-deps/ubuntu/noble/**'
189- dokken/cinc: 'dokken/cinc/**'
190- python/3.9/jammy: 'python/3.9/jammy/**'
191- python/3.9/slim-jammy: 'python/3.9/slim-jammy/**'
192- python/3.9/noble: 'python/3.9/noble/**'
193- python/3.9/slim-noble: 'python/3.9/slim-noble/**'
194- python/3.10/jammy: 'python/3.10/jammy/**'
195- python/3.10/slim-jammy: 'python/3.10/slim-jammy/**'
196- python/3.10/noble: 'python/3.10/noble/**'
197- python/3.10/slim-noble: 'python/3.10/slim-noble/**'
198- python/3.11/jammy: 'python/3.11/jammy/**'
199- python/3.11/slim-jammy: 'python/3.11/slim-jammy/**'
200- python/3.11/noble: 'python/3.11/noble/**'
201- python/3.11/slim-noble: 'python/3.11/slim-noble/**'
202- python/3.12/jammy: 'python/3.12/jammy/**'
203- python/3.12/slim-jammy: 'python/3.12/slim-jammy/**'
204- python/3.12/noble: 'python/3.12/noble/**'
205- python/3.12/slim-noble: 'python/3.12/slim-noble/**'
206- python/3.13/jammy: 'python/3.13/jammy/**'
207- python/3.13/slim-jammy: 'python/3.13/slim-jammy/**'
208- python/3.13/noble: 'python/3.13/noble/**'
209- python/3.13/slim-noble: 'python/3.13/slim-noble/**'
210- ros/humble/ubuntu/jammy: 'ros/humble/ubuntu/jammy/**'
211- ros/iron/ubuntu/jammy: 'ros/iron/ubuntu/jammy/**'
212- ros/jazzy/ubuntu/noble: 'ros/jazzy/ubuntu/noble/**'
213- ros/noetic/ubuntu/focal: 'ros/noetic/ubuntu/focal/**'
214- ros/ready/ubuntu: 'ros/ready/ubuntu/**'
215- polymath-ros/humble/ubuntu/jammy: 'polymath-ros/humble/ubuntu/jammy/**'
216- polymath-ros/iron/ubuntu/jammy: 'polymath-ros/iron/ubuntu/jammy/**'
217- polymath-ros/jazzy/ubuntu/noble: 'polymath-ros/jazzy/ubuntu/noble/**'
218-
219-
220- # Job to build and test each of the modified images
221- self-hosted-build :
222- needs : self-hosted-changes
223- strategy :
224- matrix :
225- # Parse JSON array containing names of all filters matching any of changed files
226- # e.g. ['image1', 'image2'] if both image folders contains changes
227- image : ${{ fromJSON(needs.self-hosted-changes.outputs.images) }}
228- if : ${{ needs.self-hosted-changes.outputs.images != '[]' && needs.self-hosted-changes.outputs.images != '' && github.event_name != 'workflow_dispatch'}}
229- runs-on : [self-hosted, multi-arch]
230- steps :
231- - name : Checkout code
232- uses : actions/checkout@v4
233-
234- - name : Get build parameters
235- shell : bash
236- working-directory : ${{ matrix.image }}
237- run : |
238- TOPLEVEL=$(git rev-parse --show-toplevel)
239- {
240- echo "run-lint-stage=$("${TOPLEVEL}/bin/run-lint-stage.sh")"
241- echo "run-test-stage=$("${TOPLEVEL}/bin/run-test-stage.sh")"
242- echo "test-entrypoint=$("${TOPLEVEL}/bin/test-entrypoint.sh")"
243- } >> "${GITHUB_ENV}"
244- cat "${GITHUB_ENV}"
245-
246- - uses : polymathrobotics/container-build-publish-action@main
247- with :
248- workdir : ${{ matrix.image }}
249- build-type : ' local'
250- run-lint-stage : ${{ env.run-lint-stage }}
251- run-test-stage : ${{ env.run-test-stage }}
252- test-entrypoint : ${{ env.test-entrypoint }}
253- dockerhub-username : ${{ secrets.CONTAINER_REGISTRY_USERNAME }}
254- dockerhub-password : ${{ secrets.CONTAINER_DESCRIPTION_PASSWORD }}
171+ dockerhub-password : ${{ secrets.CONTAINER_DESCRIPTION_PASSWORD }}
0 commit comments