From 8b040e67881fd0225f2fcedc27e292598f4ccd2a Mon Sep 17 00:00:00 2001 From: Jlopez Date: Fri, 3 Feb 2023 19:35:51 -0500 Subject: [PATCH] changed deployment ci to be on pushed tags --- .github/workflows/deployment.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 6e8d366..8e9e9d5 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -2,7 +2,8 @@ name: Docker on: push: - branches: [master] + tags: + - "v*.*.*" jobs: build: @@ -25,6 +26,10 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + - name: Get Tag Version + id: tag + run: "echo ::set-output name=version::${GITHUB_REF#refs/*/}" + - name: Set up Docker Buildx id: buildx uses: docker/setup-buildx-action@v2 @@ -36,7 +41,9 @@ jobs: context: ./ file: ./Dockerfile push: true - tags: ${{ secrets.DOCKER_HUB_REPOSITORY }}:latest + tags: | + ${{ env.DOCKERHUB_REPOSITORY }}:latest + ${{ env.DOCKERHUB_REPOSITORY }}:${{ steps.tag.outputs.version }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache - name: Image digest