Skip to content

Commit 2efa8d4

Browse files
authored
Only add the test container to cache once (#3518)
1 parent 879efeb commit 2efa8d4

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

.github/actions/smoke-tests/action.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ runs:
7777
file: tests/docker/Dockerfile
7878
context: '.'
7979
cache-from: type=gha,scope=test-runner
80-
cache-to: type=gha,scope=test-runner,mode=max
8180
tags: test-runner:${{ github.sha }}
8281
pull: true
8382
load: true

.github/workflows/ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ jobs:
274274
name: Setup Matrix for Smoke Tests
275275
runs-on: ubuntu-22.04
276276
needs: [checks, build-docker-nap]
277+
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
277278
outputs:
278279
matrix: ${{ steps.set-matrix.outputs.matrix }}
279280
steps:
@@ -299,6 +300,21 @@ jobs:
299300
\"images\": [{\"image\": \"debian\"}, {\"image\": \"debian-plus\"}]}" >> $GITHUB_OUTPUT
300301
fi
301302
303+
- name: Checkout Repository
304+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
305+
- name: Docker Buildx
306+
uses: docker/setup-buildx-action@15c905b16b06416d2086efa066dd8e3a35cc7f98 # v2.4.0
307+
- name: Build Test-Runner Container
308+
uses: docker/build-push-action@37abcedcc1da61a57767b7588cb9d03eb57e28b3 # v3.3.0
309+
with:
310+
file: tests/docker/Dockerfile
311+
context: '.'
312+
cache-from: type=gha,scope=test-runner
313+
cache-to: type=gha,scope=test-runner,mode=max
314+
tags: test-runner:${{ github.sha }}
315+
pull: true
316+
load: true
317+
302318
smoke-tests:
303319
name: Smoke Tests
304320
runs-on: ubuntu-22.04

0 commit comments

Comments
 (0)