Skip to content

Commit

Permalink
[TAG]v3-tagged
Browse files Browse the repository at this point in the history
test custom image tags
  • Loading branch information
SandroBarillaPXL committed Oct 3, 2024
1 parent 5c7c5d8 commit a7feddf
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ jobs:
runs-on: ubuntu-latest
needs: test
steps:
- name: Set tag
run: |
COMMIT_MSG="${{ github.event.head_commit.message }}"
echo "Commit message: $COMMIT_MSG"
if [[ "$COMMIT_MSG" =~ ^\[TAG\] ]]; then
TAG=$(echo "$COMMIT_MSG" | sed 's/^\[TAG\] *//')
echo "TAG=$TAG" >> $GITHUB_ENV
else
echo "TAG=latest >> $GITHUB_ENV
fi
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand All @@ -31,5 +42,5 @@ jobs:
uses: docker/build-push-action@v3
with:
push: true
tags: ${{ secrets.DOCKERHUB_USER }}/expertlab:latest
tags: ${{ secrets.DOCKERHUB_USER }}/expertlab:${{ env.TAG }}

0 comments on commit a7feddf

Please sign in to comment.