Skip to content

Commit

Permalink
changed deployment ci to be on pushed tags
Browse files Browse the repository at this point in the history
  • Loading branch information
SonOfLope committed Feb 4, 2023
1 parent 71f3051 commit 8b040e6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Docker

on:
push:
branches: [master]
tags:
- "v*.*.*"

jobs:
build:
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 8b040e6

Please sign in to comment.