diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 6fd3069..a5bfcb1 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -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"