Skip to content

Commit

Permalink
ci/docker: fix: tag main as latest
Browse files Browse the repository at this point in the history
  • Loading branch information
vogler committed Aug 2, 2024
1 parent eac11e8 commit 2b6779a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,14 @@ jobs:
-
name: Set environment variables
run: |
echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
BRANCH=${GITHUB_REF#refs/heads/}
echo "$BRANCH" >> $GITHUB_ENV
echo "NOW=$(date -R)" >> $GITHUB_ENV # date -Iseconds; date +'%Y-%m-%dT%H:%M:%S'
if [[ "${{ env.BRANCH }}" == "main" ]]; then
if [[ "$BRANCH" == "main" ]]; then
echo "IMAGE_TAG=latest" >> $GITHUB_ENV
else
echo "IMAGE_TAG=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
echo "IMAGE_TAG=$BRANCH" >> $GITHUB_ENV
fi
# TODO the above didn't tag main as latest... probably not available in env.BRANCH right away
echo "${{ env.BRANCH }}"
echo "IMAGE_TAG=latest" >> $GITHUB_ENV
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down

0 comments on commit 2b6779a

Please sign in to comment.