Skip to content

Commit

Permalink
Tag should always be present (#333)
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor authored Jan 31, 2024
1 parent b06ad24 commit 45132e2
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/build-test-gumtree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ jobs:
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx
- name: set docker image tag
id: set-tag
run: |
if [[ $GITHUB_REF == refs/tags/v* ]]; then
echo "IMAGE_TAG=$(echo $GITHUB_REF | sed 's/refs\/tags\///')" >> $GITHUB_ENV
else
echo "IMAGE_TAG=latest" >> $GITHUB_ENV
fi
- name: check secrets presence
id: checksecrets
shell: bash
Expand All @@ -103,15 +111,6 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: set docker image tag
id: set-tag
if: (steps.checksecrets.outputs.secretspresent == 'true')
run: |
if [[ $GITHUB_REF == refs/tags/v* ]]; then
echo "IMAGE_TAG=$(echo $GITHUB_REF | sed 's/refs\/tags\///')" >> $GITHUB_ENV
else
echo "IMAGE_TAG=latest" >> $GITHUB_ENV
fi
- name: build and push docker image
uses: docker/build-push-action@v5
with:
Expand Down

0 comments on commit 45132e2

Please sign in to comment.