Skip to content

Bridge Release

Bridge Release #71

name: Bridge Release
on:
workflow_dispatch:
workflow_run:
workflows:
- Mega Releaser
types:
- completed
env:
CARGO_TERM_COLOR: always
jobs:
release:
name: release x86_64-unknown-linux-gnu
runs-on: ubuntu-24.04
environment: release
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-24.04
extension: ""
- target: aarch64-apple-darwin
os: macos-latest
extension: ""
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Compile bridge
run: cargo build --release --manifest-path bridge/svix-bridge/Cargo.toml
- name: Release
uses: actions/upload-artifact@v4
with:
name: svix-bridge-${{ matrix.target }}
path: bridge/target/release/svix-bridge
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
docker:
name: release docker
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: tree:0
- name: Setup QEMU
uses: docker/setup-qemu-action@v2
- name: Login Docker
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Derive Version Numbers
run: |
export REPO="${{ secrets.DOCKERHUB_USERNAME }}/svix-bridge"
export GIT_TAG="$(git describe --tags --abbrev=0)"
export DOCKER_TAGS=$(echo "${GIT_TAG}" | sed -E "s#v([0-9]+)\.([0-9]+)\.([0-9]+)#${REPO}:latest,${REPO}:v\1.\2.\3,${REPO}:v\1.\2,${REPO}:v\1#")
echo "DOCKER_TAGS=${DOCKER_TAGS}" >> "$GITHUB_ENV"
echo "Generated Tags: ${DOCKER_TAGS}"
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: ./
file: ./bridge/Dockerfile
push: true
tags: ${{ env.DOCKER_TAGS }}
platforms: linux/amd64,linux/arm64