Skip to content

Commit b62bd84

Browse files
ci: multi-arch docker builds via shared-workflow
1 parent 1469cad commit b62bd84

File tree

1 file changed

+9
-23
lines changed

1 file changed

+9
-23
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,30 +24,16 @@ on:
2424
type: string
2525
required: true
2626

27-
env:
28-
# Docker image tags. See https://github.com/docker/metadata-action for format
29-
TAGS_CONFIG: |
30-
type=ref,event=branch,enable={{is_default_branch}}
31-
type=semver,pattern={{version}},value=${{ inputs.tag }},enable=${{ inputs.tag != '' }}
32-
33-
3427
jobs:
35-
main:
28+
build-multiarch:
3629
permissions:
3730
contents: read
3831
id-token: write
39-
40-
runs-on: ubuntu-latest
41-
steps:
42-
- name: Checkout
43-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
44-
with:
45-
persist-credentials: false
46-
47-
- name: Build Docker image
48-
uses: grafana/shared-workflows/actions/build-push-to-dockerhub@06f8765f6a5043b01e5a3dddd78a71741552add7 # build-push-to-dockerhub/v0.3.0
49-
with:
50-
platforms: linux/amd64,linux/arm64
51-
push: ${{ github.event_name == 'push' || github.event_name == 'workflow_call' }}
52-
tags: ${{ env.TAGS_CONFIG }}
53-
repository: ${{ github.repository }}
32+
uses: grafana/shared-workflows/.github/workflows/docker-build-push-multiarch.yml@4101b7ff332a47ef03b59a554624800a61668090 # main
33+
with:
34+
platforms: linux/amd64,linux/arm64
35+
tags: |
36+
type=ref,event=branch,enable={{is_default_branch}}
37+
type=semver,pattern={{version}},value=${{ inputs.tag }},enable=${{ inputs.tag != '' }}
38+
push: ${{ github.event_name == 'push' || github.event_name == 'workflow_call' }}
39+
registries: "dockerhub"

0 commit comments

Comments
 (0)