Skip to content

Commit

Permalink
Docker Build Tag
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanielvarona committed Apr 26, 2024
1 parent daf5000 commit 7b12a2f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
release:
types: [released]


jobs:
docker-build-push:
runs-on: ubuntu-latest
Expand All @@ -23,12 +24,20 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
- name: Extract Tag Name Without 'v' Prefix
if: startsWith(github.ref, 'refs/tags/')
id: extract_tag
run: echo "tag_version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT

- name: Build and Push
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: .
file: flask-gunicorn.Dockerfile
target: production
tags: nathanielvarona/pritunl-slack-app
tags: |
nathanielvarona/pritunl-slack-app,
nathanielvarona/pritunl-slack-app:${{ steps.extract_tag.outputs.tag_version }}
platforms: linux/amd64,linux/arm64
push: true

0 comments on commit 7b12a2f

Please sign in to comment.