Skip to content

Commit 9df5862

Browse files
committed
fix: multi-arch / long commit tag / remove duplicate ref
1 parent e3905c8 commit 9df5862

File tree

2 files changed

+25
-10
lines changed

2 files changed

+25
-10
lines changed

.github/workflows/docker-adhoc.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
name: Docker Manual Build & Push
22

33
on:
4-
workflow_dispatch:
5-
inputs:
6-
ref:
7-
description: 'Branch to build'
8-
required: true
9-
type: string
4+
workflow_dispatch: {}
105

116
jobs:
127
build-and-push:
13-
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
settings:
11+
- arch: linux/amd64
12+
runs-on: ubuntu-24.04
13+
- arch: linux/arm64
14+
runs-on: ubuntu-24.04-arm
15+
16+
runs-on: ${{ matrix.settings.runs-on }}
17+
1418
permissions:
1519
contents: read
1620
packages: write
@@ -19,7 +23,7 @@ jobs:
1923
- name: Checkout specified ref
2024
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2125
with:
22-
ref: ${{ inputs.ref }}
26+
ref: ${{ inputs.GITHUB_REF }}
2327

2428
- name: Set up Docker Buildx
2529
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
@@ -44,4 +48,5 @@ jobs:
4448
push: true
4549
tags: ${{ steps.tags.outputs.tags }}
4650
cache-from: type=gha
51+
platforms: ${{ matrix.settings.arch }}
4752
cache-to: type=gha,mode=max

.github/workflows/docker-ci.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,16 @@ on:
1010

1111
jobs:
1212
build-and-push:
13-
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
settings:
16+
- arch: linux/amd64
17+
runs-on: ubuntu-24.04
18+
- arch: linux/arm64
19+
runs-on: ubuntu-24.04-arm
20+
21+
runs-on: ${{ matrix.settings.runs-on }}
22+
1423
permissions:
1524
contents: read
1625
packages: write
@@ -37,7 +46,7 @@ jobs:
3746
images: ghcr.io/base/node-reth-dev
3847
tags: |
3948
type=ref,event=branch
40-
type=sha,format=short
49+
type=sha,format=long
4150
4251
- name: Build and push Docker image
4352
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
@@ -46,5 +55,6 @@ jobs:
4655
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
4756
tags: ${{ steps.meta.outputs.tags }}
4857
labels: ${{ steps.meta.outputs.labels }}
58+
platforms: ${{ matrix.settings.arch }}
4959
cache-from: type=gha
5060
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)