Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Docker Build Tag #21

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading