Skip to content

Commit b152863

Browse files
author
Ben Du
authored
Avoid use of reserved env var in deploy workflow (#6)
Auto publish to github container repo is now working correctly
1 parent 2effe6c commit b152863

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/deploy.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
deploy:
1010
runs-on: ubuntu-latest
1111
env:
12-
GITHUB_REPOSITORY: ghcr.io/${{ github.repository }}
12+
REGISTRY: ghcr.io/${{ github.repository }}
1313
permissions:
1414
contents: read
1515
packages: write
@@ -32,13 +32,13 @@ jobs:
3232
password: ${{ secrets.GITHUB_TOKEN }}
3333

3434
- name: Tag image for github container repository with commit SHA
35-
run: 'docker tag controller:latest $GITHUB_REPOSITORY:$GITHUB_SHA'
35+
run: 'docker tag controller:latest $REGISTRY:$GITHUB_SHA'
3636

3737
- name: Push image for github container repository with commit SHA
38-
run: 'docker push $GITHUB_REPOSITORY:$GITHUB_SHA'
38+
run: 'docker push $REGISTRY:$GITHUB_SHA'
3939

4040
- name: Tag image for github container repository with latest
41-
run: 'docker tag controller:latest $GITHUB_REPOSITORY:latest'
41+
run: 'docker tag controller:latest $REGISTRY:latest'
4242

4343
- name: Push image for github container repository with latest
44-
run: 'docker push $GITHUB_REPOSITORY:latest'
44+
run: 'docker push $REGISTRY:latest'

0 commit comments

Comments
 (0)