Skip to content

Commit 1d757f0

Browse files
committed
add docker publish for webhook-bridge
1 parent fa267fb commit 1d757f0

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Webhook Bridge Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
docker:
9+
name: release docker
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@master
13+
14+
- name: Setup QEMU
15+
uses: docker/setup-qemu-action@v2
16+
17+
- name: Login Docker
18+
uses: docker/login-action@v1
19+
with:
20+
username: ${{ secrets.DOCKERHUB_USERNAME }}
21+
password: ${{ secrets.DOCKERHUB_TOKEN }}
22+
23+
- name: Setup Docker Buildx
24+
uses: docker/setup-buildx-action@v2
25+
26+
- name: Derive Version Numbers
27+
run: |
28+
export REPO="${{ secrets.DOCKERHUB_USERNAME }}/svix-webhook-bridge"
29+
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"
30+
31+
- name: Build and push Docker image
32+
uses: docker/build-push-action@v2
33+
with:
34+
context: ./webhook-bridge
35+
file: ./webhook-bridge/Dockerfile
36+
push: true
37+
tags: ${{ env.DOCKER_TAGS }}
38+
platforms: linux/amd64

0 commit comments

Comments
 (0)