Skip to content

Commit

Permalink
hotfix(GHA) include tags publication as a source of trigger for deplo…
Browse files Browse the repository at this point in the history
…yment

Signed-off-by: Damien Duportal <[email protected]>
  • Loading branch information
dduportal committed Mar 12, 2024
1 parent 967c50d commit d6f7ca9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ jobs:
run: make test
- name: Generate README
run: make README
#### Deployment Zone: only on main branch
#### Deployment Zone: only on main branch (or tags)
- name: Login to Docker Hub for Deployment
if: contains('refs/heads/main', github.ref)
if: contains('refs/heads/main', github.ref) || contains('refs/tags/', github.ref)
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Deploy
if: contains('refs/heads/main', github.ref)
if: contains('refs/heads/main', github.ref) || contains('refs/tags/', github.ref)
run: |
export IMAGE_VERSION="$(echo ${GITHUB_REF#refs/tags/} | grep -v 'refs/heads')"
export IMAGE_NAME="asciidoctor/docker-asciidoctor"
Expand Down

0 comments on commit d6f7ca9

Please sign in to comment.