Skip to content

Commit df9f4f8

Browse files
committed
Use experimental Docker builder for proper versioning
1 parent 1ca3176 commit df9f4f8

File tree

1 file changed

+25
-11
lines changed

1 file changed

+25
-11
lines changed

.github/workflows/docker.yml

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,31 @@
11
name: Docker
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
5-
branches: [ main ]
8+
branches:
9+
- 'main'
10+
tags:
11+
- '4.*'
12+
pull_request:
613

714
jobs:
8-
build-and-push:
9-
runs-on: ubuntu-latest
10-
11-
name: Container Image
12-
steps:
13-
- uses: actions/checkout@v4
14-
- uses: mback2k/action-docker-package@master
15-
with:
16-
registry_username: ${{ github.repository_owner }}
17-
registry_password: ${{ secrets.GITHUB_TOKEN }}
15+
build:
16+
uses: docker/github-builder-experimental/.github/workflows/build.yml@main
17+
permissions:
18+
contents: read # to fetch the repository content
19+
id-token: write # for signing attestation(s) with GitHub OIDC Token
20+
with:
21+
output: image
22+
push: ${{ github.event_name != 'pull_request' }}
23+
platforms: linux/amd64,linux/arm64
24+
build-args: |
25+
version=${{ fromJSON(env.INPUT_META-LABELS)['org.opencontainers.image.version'] }}
26+
meta-images: |
27+
ghcr.io/${{ github.repository }}
28+
meta-tags: |
29+
type=pep440,pattern={{version}}
30+
type=ref,event=branch
31+
type=ref,event=pr

0 commit comments

Comments
 (0)