mirror of
https://github.com/luxfi/indexer.git
synced 2026-09-24 00:25:37 +00:00
ci: build multi-arch (amd64 + arm64) on native runners
This commit is contained in:
@@ -2,51 +2,22 @@ name: Docker
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [main, dev, test]
|
||||
tags: ['v*']
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
# Multi-arch (amd64 + arm64) on native lux ARC runners.
|
||||
# No QEMU emulation. No GitHub-hosted fallback.
|
||||
# Semver-only tags (v*); see hanzoai/.github docker-build.yml.
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 45
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: docker/setup-qemu-action@v3
|
||||
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Compute tags
|
||||
id: meta
|
||||
run: |
|
||||
set -eu
|
||||
short_sha=$(git rev-parse --short HEAD)
|
||||
ref_name="${GITHUB_REF_NAME}"
|
||||
tags="ghcr.io/luxfi/indexer:${short_sha},ghcr.io/luxfi/indexer:${ref_name}"
|
||||
if [ "${ref_name}" = "main" ]; then
|
||||
tags="${tags},ghcr.io/luxfi/indexer:latest"
|
||||
fi
|
||||
echo "tags=${tags}" >> "$GITHUB_OUTPUT"
|
||||
echo "sha=${short_sha}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
push: true
|
||||
platforms: linux/amd64
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
build-args: |
|
||||
VERSION=${{ steps.meta.outputs.sha }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
uses: hanzoai/.github/.github/workflows/docker-build.yml@main
|
||||
with:
|
||||
image: ghcr.io/luxfi/indexer
|
||||
platforms: linux/amd64,linux/arm64
|
||||
runner-amd64: lux-build-linux-amd64
|
||||
runner-arm64: lux-build-linux-arm64
|
||||
runner-deploy: lux-build-linux-amd64
|
||||
secrets: inherit
|
||||
|
||||
Reference in New Issue
Block a user