Skip to content

Commit 833a6ac

Browse files
authored
Load docker images before testing (#60)
2 parents 381a475 + fe5f856 commit 833a6ac

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

.github/actions/build-image/action.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ inputs:
2020
required: false
2121
type: string
2222
default: "latest"
23+
tags:
24+
description: "Alternate tags to use"
25+
required: false
26+
type: string
27+
default: ""
2328

2429

2530
runs:
@@ -43,7 +48,10 @@ runs:
4348
IDRIS_SHA=${{ steps.get-sha.outputs.sha }}
4449
IDRIS_LSP_VERSION=${{ inputs.lsp-version }}
4550
IDRIS_LSP_SHA=${{ steps.get-sha.outputs.lsp-sha }}
46-
tags: ghcr.io/${{ inputs.repo }}/${{ inputs.dockerfile }}:${{ inputs.version }}
51+
load: true
52+
tags: |
53+
ghcr.io/${{ inputs.repo }}/${{ inputs.dockerfile }}:${{ inputs.version }}
54+
${{ inputs.tags }}
4755
4856
# When doing matrix builds, we need to scope the image
4957
# https://github.com/moby/buildkit/issues/2885

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ jobs:
138138
- idris-version: "v0.6.0"
139139
lsp-version: "idris2-0.6.0"
140140
env:
141-
TAG: ghcr.io/${{ github.repository }}/devcontainer:${{ matrix.idris-version }}
141+
TEST_TAG: devcontainer-test
142142
steps:
143143
- name: Checkout Repo
144144
uses: actions/checkout@v3
@@ -150,6 +150,7 @@ jobs:
150150
dockerfile: devcontainer
151151
repo: ${{ github.repository }}
152152
lsp-version: ${{ matrix.lsp-version }}
153+
tags: ${{ env.TEST_TAG }}
153154

154155
- name: Setup BATS
155156
uses: andmos/setup-bats@patch-1
@@ -169,7 +170,7 @@ jobs:
169170
- name: Run Test 2
170171
run: |
171172
export LIB_PATH=/usr/lib/
172-
export DOCKER_IMAGE=${{ env.TAG }}
173+
export DOCKER_IMAGE=${{ env.TEST_TAG }}
173174
bats tests/devcontainer-idris.bats
174175
175176
devcontainer-deploy:
@@ -215,7 +216,7 @@ jobs:
215216
idris-version: ["v0.5.1", "v0.6.0", "latest"]
216217
dockerfile: [ubuntu, debian]
217218
env:
218-
TAG: ghcr.io/${{ github.repository }}/${{ matrix.dockerfile }}:${{ matrix.idris-version }}
219+
TEST_TAG: test-${{ matrix.dockerfile }}
219220
steps:
220221
- name: Checkout Repo
221222
uses: actions/checkout@v3
@@ -226,6 +227,7 @@ jobs:
226227
version: ${{ matrix.idris-version }}
227228
dockerfile: ${{ matrix.dockerfile }}
228229
repo: ${{ github.repository }}
230+
tags: ${{ env.TEST_TAG }}
229231

230232
- name: Setup BATS
231233
uses: mig4/setup-bats@v1
@@ -245,7 +247,7 @@ jobs:
245247
- name: Run Test
246248
run: |
247249
export LIB_PATH=/usr/lib/
248-
export DOCKER_IMAGE=${{ env.TAG }}
250+
export DOCKER_IMAGE=${{ env.TEST_TAG }}
249251
bats tests/consumer-idris.bats
250252
251253

0 commit comments

Comments
 (0)