|
14 | 14 | submodules: recursive
|
15 | 15 | fetch-depth: 0
|
16 | 16 |
|
| 17 | + - name: Check if container files was modified and if container version already exists |
| 18 | + id: checks |
| 19 | + run: | |
| 20 | + echo modified=$(./.ci/check-container-sources-modified) >> "$GITHUB_OUTPUT" |
| 21 | + echo container-published=$(./.ci/check-container-version-published) >> "$GITHUB_OUTPUT" |
| 22 | +
|
| 23 | + - name: Build container image |
| 24 | + if: steps.checks.outputs.modified == 'true' |
| 25 | + run: | |
| 26 | + if "${{ steps.checks.outputs.container-published }}" == "true"; then |
| 27 | + echo "::error::Container modified but version $(cat .containerversion) already published" |
| 28 | + exit 1 |
| 29 | + fi |
| 30 | + ./.ci/build-container |
| 31 | +
|
17 | 32 | - name: Pull container image
|
| 33 | + if: steps.checks.outputs.modified == 'false' |
18 | 34 | run: ./.ci/pull-container
|
19 | 35 |
|
20 | 36 | - name: Run CI in container
|
|
66 | 82 | # get the .ci scripts from there as well.
|
67 | 83 | git checkout -f ${{ github.event.pull_request.merge_commit_sha }} -- .ci .github
|
68 | 84 |
|
| 85 | + - name: Check if container files was modified and if container version already exists |
| 86 | + id: checks |
| 87 | + run: | |
| 88 | + echo modified=$(./.ci/check-container-sources-modified) >> "$GITHUB_OUTPUT" |
| 89 | + echo container-published=$(./.ci/check-container-version-published) >> "$GITHUB_OUTPUT" |
| 90 | +
|
| 91 | + - name: Build container image |
| 92 | + if: steps.checks.outputs.modified == 'true' |
| 93 | + run: | |
| 94 | + if "${{ steps.checks.outputs.container-published }}" == "true"; then |
| 95 | + echo "::error::Container modified but version $(cat .containerversion) already published" |
| 96 | + exit 1 |
| 97 | + fi |
| 98 | + ./.ci/build-container |
| 99 | +
|
69 | 100 | - name: Pull container image
|
| 101 | + if: steps.checks.outputs.modified == 'false' |
70 | 102 | run: ./.ci/pull-container
|
71 | 103 |
|
72 | 104 | - name: Run CI in container
|
|
0 commit comments