Skip to content

Commit a501fd4

Browse files
fix: tags (#754)
* code tag as v1 not master * make test use passed tag currently runs get-branch name. Bad for any commits on master * tag instead of branch name in some workflows
1 parent 7ba74d2 commit a501fd4

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

.github/workflows/docker-nightly.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
outputs:
1111
REGISTRY_NAME: "k8scc01covidacr.azurecr.io"
12-
branch-name: "v1"
12+
TAG: "v1"
1313
steps:
1414
- uses: actions/checkout@v4
1515

@@ -30,7 +30,7 @@ jobs:
3030
with:
3131
image: ${{ matrix.image }}
3232
registry-name: "${{ needs.vars.outputs.REGISTRY_NAME }}"
33-
branch-name: "${{ needs.vars.outputs.branch-name }}"
33+
tag: "${{ needs.vars.outputs.TAG }}"
3434
secrets:
3535
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
3636
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}

.github/workflows/docker-pull-test.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ on:
1414
description: url of the registry <registy-name>
1515
required: true
1616
type: string
17-
branch-name:
18-
description: The name of the current branch
17+
tag:
18+
description: The tag of the image
1919
required: true
2020
type: string
2121
secrets:
@@ -59,7 +59,7 @@ jobs:
5959

6060
- name: Pull existing image
6161
id: pull-existing
62-
run: make pull/${{ inputs.image }} REPO=${{ inputs.registry-name }} TAG=${{ inputs.branch-name }}
62+
run: make pull/${{ inputs.image }} REPO=${{ inputs.registry-name }} TAG=${{ inputs.tag }}
6363

6464
- name: Set Up Python for Test Suite
6565
uses: actions/setup-python@v4
@@ -72,7 +72,7 @@ jobs:
7272
make install-python-dev-venv
7373
7474
- name: Test image
75-
run: make test/${{ inputs.image }}
75+
run: make test/${{ inputs.image }} TAG=${{ inputs.tag }}
7676

7777
# Free up space from build process (containerscan action will run out of space if we don't)
7878
- name: cleanup runner
@@ -96,7 +96,7 @@ jobs:
9696
trivy image \
9797
--db-repository ${{ env.TRIVY_DATABASES }} \
9898
--java-db-repository ${{ env.TRIVY_JAVA_DATABASES }} \
99-
${{ inputs.registry-name }}/${{ inputs.image }}:${{ inputs.branch-name }} \
99+
${{ inputs.registry-name }}/${{ inputs.image }}:${{ inputs.tag }} \
100100
--exit-code 10 --timeout=20m --scanners vuln --severity CRITICAL --quiet
101101
EXIT_CODE=$?
102102

.github/workflows/docker-pull-upload.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646

4747
- name: Pull existing image
4848
id: pull-existing
49-
run: make pull/${{ inputs.image }} REPO=${{ inputs.registry-name }} TAG=master
49+
run: make pull/${{ inputs.image }} REPO=${{ inputs.registry-name }} TAG=v1
5050

5151
- name: Retag existing image
5252
run: make post-build/${{ inputs.image }} REPO=${{ inputs.registry-name }} SOURCE_FULL_IMAGE_NAME=${{ steps.pull-existing.outputs.image_name }}

.github/workflows/docker.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ jobs:
204204
with:
205205
image: "jupyterlab-cpu"
206206
registry-name: "${{ needs.vars.outputs.REGISTRY_NAME }}"
207-
branch-name: "${{ needs.vars.outputs.branch-name }}"
207+
tag: "${{ needs.vars.outputs.branch-name }}"
208208
secrets:
209209
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
210210
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
@@ -216,7 +216,7 @@ jobs:
216216
with:
217217
image: "jupyterlab-tensorflow"
218218
registry-name: "${{ needs.vars.outputs.REGISTRY_NAME }}"
219-
branch-name: "${{ needs.vars.outputs.branch-name }}"
219+
tag: "${{ needs.vars.outputs.branch-name }}"
220220
secrets:
221221
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
222222
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
@@ -228,7 +228,7 @@ jobs:
228228
with:
229229
image: "rstudio"
230230
registry-name: "${{ needs.vars.outputs.REGISTRY_NAME }}"
231-
branch-name: "${{ needs.vars.outputs.branch-name }}"
231+
tag: "${{ needs.vars.outputs.branch-name }}"
232232
secrets:
233233
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
234234
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
@@ -240,7 +240,7 @@ jobs:
240240
with:
241241
image: "sas"
242242
registry-name: "${{ needs.vars.outputs.REGISTRY_NAME }}"
243-
branch-name: "${{ needs.vars.outputs.branch-name }}"
243+
tag: "${{ needs.vars.outputs.branch-name }}"
244244
secrets:
245245
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
246246
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
@@ -252,7 +252,7 @@ jobs:
252252
with:
253253
image: "remote-desktop"
254254
registry-name: "${{ needs.vars.outputs.REGISTRY_NAME }}"
255-
branch-name: "${{ needs.vars.outputs.branch-name }}"
255+
tag: "${{ needs.vars.outputs.branch-name }}"
256256
secrets:
257257
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
258258
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ Tests are formatted using typical pytest formats (python files with `def test_SO
133133
```
134134
username@hostname:~$ docker images
135135
REPOSITORY TAG IMAGE ID CREATED SIZE
136-
k8scc01covidacr.azurecr.io/jupyterlab-tensorflow master 13f8dc0e4f7a 26 minutes ago 14.6GB
137-
k8scc01covidacr.azurecr.io/jupyterlab-pytorch master 2b9acb795079 19 hours ago 15.5GB
136+
k8scc01covidacr.azurecr.io/jupyterlab-tensorflow v1 13f8dc0e4f7a 26 minutes ago 14.6GB
137+
k8scc01covidacr.azurecr.io/jupyterlab-pytorch v1 2b9acb795079 19 hours ago 15.5GB
138138
jupyter/datascience-notebook 9ed3b8de5de1 9a0c8d86de1a 5 weeks ago 4.25GB
139139
```
140140

0 commit comments

Comments
 (0)