Skip to content

Commit

Permalink
Update docker-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
eunanio committed Apr 5, 2024
1 parent d6e1a5a commit 46aa46a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches: [ main ]
tags:
- '*'
release:
types: [published]

jobs:
buildAndPush:
Expand All @@ -21,15 +23,10 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract tag name
id: extract_tag
run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF#refs/tags/})"

- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/terrapak:${{ steps.extract_tag.outputs.tag }}
tags: ${{ secrets.DOCKERHUB_USERNAME }}/terrapak:${{ github.event.release.tag_name }}

0 comments on commit 46aa46a

Please sign in to comment.