Skip to content

build(gateway): add libclang-dev + libz3-dev to fix post-merge build #2

build(gateway): add libclang-dev + libz3-dev to fix post-merge build

build(gateway): add libclang-dev + libz3-dev to fix post-merge build #2

name: release-gateway
on:
push:
branches: [main, feat/external-compute-driver-socket]
paths:
- 'crates/**'
- 'proto/**'
- 'Cargo.toml'
- 'Cargo.lock'
- 'Dockerfile.gateway'
- '.github/workflows/release-gateway.yml'
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
image:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Lowercase repo owner
id: repo
run: echo "lower=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
- name: Tag set
id: tags
run: |
set -e
BRANCH="${GITHUB_REF_NAME//\//-}"
{
echo "tags<<EOF"
echo "ghcr.io/${{ steps.repo.outputs.lower }}/openshell-gateway:${{ github.sha }}"
if [ "$GITHUB_REF" = "refs/heads/main" ]; then
echo "ghcr.io/${{ steps.repo.outputs.lower }}/openshell-gateway:latest"
else
echo "ghcr.io/${{ steps.repo.outputs.lower }}/openshell-gateway:branch-${BRANCH}"
fi
echo "EOF"
} >> "$GITHUB_OUTPUT"
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.gateway
push: true
tags: ${{ steps.tags.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max