-
Notifications
You must be signed in to change notification settings - Fork 9
52 lines (52 loc) · 1.51 KB
/
ghcr-release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: ghcr-release
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
jobs:
docker:
strategy:
fail-fast: true
matrix:
version:
- jvm
- native
platform:
- linux/amd64
- linux/arm64
uses: josephrodriguez/github-workflow/.github/workflows/docker-build-release-by-digest.yaml@main
with:
github_repository: ${{ github.repository }}
docker_digest_name: digests-${{ matrix.version }}
docker_push_enabled: true
docker_file_name: "./Dockerfile.${{ matrix.version }}"
docker_image_name: ghcr.io/${{ github.repository }}
docker_platform: ${{ matrix.platform }}
docker_registry_url: ghcr.io
secrets:
DOCKER_REGISTRY_USERNAME: ${{ github.actor }}
DOCKER_REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
push:
strategy:
fail-fast: true
matrix:
version:
- jvm
- native
uses: josephrodriguez/github-workflow/.github/workflows/docker-push-release-by-digest.yaml@main
permissions:
packages: write
contents: read
needs:
- docker
with:
docker_registry_url: ghcr.io
docker_image_name: ghcr.io/${{ github.repository }}
docker_image_tags: type=raw,value=${{ matrix.version }}-{{date 'YYYYMMDDhhmm'}}-{{sha}}
docker_digest_pattern: digests-${{ matrix.version }}-*
secrets:
DOCKER_REGISTRY_USERNAME: ${{ github.actor }}
DOCKER_REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }}