Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Release Docker tags with version numbers on GitHub release #464

Merged
merged 8 commits into from
May 26, 2022
Merged
Changes from 7 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
7 changes: 6 additions & 1 deletion .github/workflows/server-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,16 @@ jobs:
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Derive Version Numbers
run: |
export REPO="${{ secrets.DOCKERHUB_USERNAME }}/svix-server"
echo DOCKER_TAGS=$(echo "${{ github.event.release.tag_name }}" | sed -E "s#v([0-9]+)\.([0-9]+)\.([0-9]+)#${REPO}:latest,${REPO}:v\1.\2.\3,${REPO}:v\1.\2,${REPO}:v\1#") >> "$GITHUB_ENV"

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: ./server
file: ./server/Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/svix-server:latest
tags: ${{ env.DOCKER_TAGS }}
platforms: linux/amd64