Skip to content

Commit 98afcd6

Browse files
authored
Merge pull request #112 from uyjulian/ci_fix_docker_tag
CI: fix missing reference to DOCKER_TAG
2 parents 4cf1b92 + 3d938eb commit 98afcd6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/docker.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@ jobs:
4343
username: ${{ github.actor }}
4444
password: ${{ secrets.GITHUB_TOKEN }}
4545

46+
- name: Extract DOCKER_TAG using tag name
47+
if: startsWith(github.ref, 'refs/tags/')
48+
run: |
49+
printf 'DOCKER_TAG=%s\n' "${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
50+
51+
- name: Use default DOCKER_TAG
52+
if: startsWith(github.ref, 'refs/tags/') != true
53+
run: |
54+
printf 'DOCKER_TAG=%s\n' "latest" >> $GITHUB_ENV
55+
4656
- name: Prepare additional environment variables from repo
4757
run: if test -f ./config/ci-docker-env.ini; then cat ./config/ci-docker-env.ini | sed -e 's/$REPOSITORY_OWNER/'"${{ github.repository_owner }}"'/g;s/$DOCKER_TAG/'"${{ env.DOCKER_TAG }}"'/g' >> $GITHUB_ENV; fi
4858

0 commit comments

Comments
 (0)