Skip to content

Commit 32b28ca

Browse files
gondoicursoragent
andcommitted
feat(docker): use shared native multi-arch workflow
Migrate docker-publish to FuelLabs/github-actions docker-build-push with build-backend native and linux/amd64,linux/arm64 on native runners. Refs DEVOPS-1248 Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent fbccd6d commit 32b28ca

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Pin the reusable workflow to a commit until github-actions merges checkout support; then @master.
2+
# Ref must be a literal (not env). Update SHA when rebasing FuelLabs/github-actions.
3+
# Inner steps in docker-build-push.yml use FuelLabs/github-actions composites; they may
4+
# still reference @master — if something diverges during testing, align those refs in the PR.
5+
#
6+
# Do not use strategy.matrix on the same job as workflow_call + job-level `if` with
7+
# matrix.* — job `if` is evaluated before matrix expansion for reusable workflows.
8+
# Add one job per package with an explicit `if` (package name literal) instead.
9+
name: Build and publish Docker image
10+
11+
on:
12+
workflow_dispatch:
13+
inputs:
14+
package:
15+
type: choice
16+
description: "Package to build and publish"
17+
default: "all"
18+
required: true
19+
options:
20+
- all
21+
- sv-dune
22+
push:
23+
branches:
24+
- main
25+
release:
26+
types:
27+
- published
28+
29+
permissions:
30+
contents: read
31+
packages: write
32+
33+
concurrency:
34+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
35+
cancel-in-progress: true
36+
37+
jobs:
38+
build-and-publish-sv-dune:
39+
uses: FuelLabs/github-actions/.github/workflows/docker-build-push.yml@7bce413db5867bcb2faf83108f6a75b199ccafe1
40+
if: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.package == 'all' || github.event.inputs.package == 'sv-dune' }}
41+
with:
42+
auth-mode: registry-login
43+
registry: ghcr.io
44+
build-backend: native
45+
platforms: linux/amd64,linux/arm64
46+
runs-on-amd64: ubuntu-latest
47+
runs-on-arm64: ubuntu-24.04-arm
48+
docker-context: .
49+
dockerfile: cluster/docker/sv-dune.Dockerfile
50+
image: ghcr.io/fuellabs/sv-dune
51+
tags: |
52+
type=ref,event=branch
53+
type=sha,prefix=
54+
type=semver,pattern={{raw}}
55+
secrets:
56+
REGISTRY_USERNAME: ${{ github.repository_owner }}
57+
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)