-
Notifications
You must be signed in to change notification settings - Fork 45
51 lines (41 loc) · 1.27 KB
/
release.yml
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
name: release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
outputs:
stable_tags: ${{ steps.bake-metadata.outputs.stable_tags }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Make bake metadata
id: bake-metadata
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: |
set -eo pipefail
echo ::group::Github context
python3 -m json.tool <<< "${GITHUB_CONTEXT}"
echo ::endgroup::
echo ::group::Bake metadata
.github/scripts/bake-metadata.py | tee bake-metadata.json
echo ::endgroup::
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: v0.12.0
driver-opts: image=moby/buildkit:v0.12.3
buildkitd-flags: --debug
- name: Login to ghcr.io
uses: docker/login-action@v2
with:
registry: ghcr.io
username: '$' # special user for authenticating as a gh actions worker
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
run: |
docker buildx bake --file=docker/docker-bake.hcl --file=bake-metadata.json release --push