Skip to content

Release

Release #12

Workflow file for this run

name: Release
on:
push:
tags:
- v*
workflow_dispatch:
jobs:
graphgate-docker:
runs-on: ubuntu-latest
strategy:
fail-fast: false
# matrix:
# images:
# - platform: linux/amd64
# dockerfile: ./Dockerfile
# target: x86_64-unknown-linux-musl
# - platform: linux/arm64
# dockerfile: ./Dockerfile
# target: aarch64-unknown-linux-musl
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get version
run: echo PACKAGE_VERSION=$(sed -nE 's/^\s*version = "(.*?)"/\1/p' Cargo.toml) >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
cache-from: type=gha
cache-to: type=gha,mode=max
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/${{ github.repository }}/graphgate:${{ env.PACKAGE_VERSION }}
ghcr.io/${{ github.repository }}/graphgate:latest