Skip to content

Commit

Permalink
fix: Update docker.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kobenguyent authored Jan 13, 2025
1 parent bc9c6bf commit edbf56b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ on:
push:
branches:
- 3.x
release:
types: [published]

jobs:
push_to_registry:
name: Build and push Docker image to Docker Hub
runs-on: ubuntu-22.04
if: startsWith(github.event.ref_name, 'release-')

steps:
- name: Check out the repo with the latest code
Expand All @@ -27,7 +26,11 @@ jobs:

- name: Get the current tag
id: currentTag
run: git fetch --prune --unshallow && TAG=$(git describe --tags --abbrev=0) && echo $TAG && echo "TAG="$TAG >> "$GITHUB_ENV"
run: |
git fetch --prune --unshallow
TAG=$(git describe --tags --abbrev=0)
echo $TAG
echo "TAG=$TAG" >> $GITHUB_ENV
- name: Build and push Docker image
uses: docker/build-push-action@v6
Expand All @@ -36,4 +39,4 @@ jobs:
push: true
tags: |
${{ secrets.DOCKERHUB_REPOSITORY }}:latest
${{ secrets.DOCKERHUB_REPOSITORY }}:${{ env.TAG }}
${{ secrets.DOCKERHUB_REPOSITORY }}:${{ env.TAG }}

0 comments on commit edbf56b

Please sign in to comment.