Skip to content

Commit 8592b95

Browse files
authored
fix: create unique image tags for each test in order to avoid race conditions between tests (#74)
* Create unique image tags for each test in order to avoid race conditions. * Fix tag formatting.
1 parent ee8e1e3 commit 8592b95

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.github/workflows/test-docker-build-complex.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ jobs:
3434
build-args: |
3535
TEST_ARG=test_value
3636
SECOND_ARG=two
37+
tags: |
38+
type=sha,format=long,suffix=-complex,priority=1002
3739
3840
- uses: nick-fields/assert-action@v2
3941
with:
@@ -42,7 +44,7 @@ jobs:
4244

4345
- uses: nick-fields/assert-action@v2
4446
with:
45-
expected: sha-${{ github.sha }}
47+
expected: sha-${{ github.sha }}-complex
4648
actual: ${{ steps.current.outputs.tag }}
4749

4850
teardown:

.github/workflows/test-docker-build-multi-platform.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ jobs:
3232
login: ${{ secrets.DOCKERHUB_USERNAME }}
3333
password: ${{ secrets.DOCKERHUB_PASSWORD }}
3434
platforms: linux/amd64,linux/arm64
35+
tags: |
36+
type=sha,format=long,suffix=-multi-platform,priority=1002
3537
3638
- name: Inspect Image
3739
id: inspect
@@ -48,7 +50,7 @@ jobs:
4850

4951
- uses: nick-fields/assert-action@v2
5052
with:
51-
expected: sha-${{ github.sha }}
53+
expected: sha-${{ github.sha }}-multi-platform
5254
actual: ${{ steps.current.outputs.tag }}
5355

5456
- uses: nick-fields/assert-action@v2

.github/workflows/test-docker-build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030
registry: registry.hub.docker.com
3131
login: ${{ secrets.DOCKERHUB_USERNAME }}
3232
password: ${{ secrets.DOCKERHUB_PASSWORD }}
33+
tags: |
34+
type=sha,format=long,suffix=-single-platform,priority=1002
3335
3436
- uses: nick-fields/assert-action@v2
3537
with:
@@ -38,7 +40,7 @@ jobs:
3840

3941
- uses: nick-fields/assert-action@v2
4042
with:
41-
expected: sha-${{ github.sha }}
43+
expected: sha-${{ github.sha }}-single-platform
4244
actual: ${{ steps.current.outputs.tag }}
4345

4446

0 commit comments

Comments
 (0)