-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (48 loc) · 1.38 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
52
53
54
55
name: Release version
on:
push:
branches:
- 'main'
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# needed to properly run buildx, otherwise buildx fails
# https://github.com/docker/buildx/issues/495#issuecomment-1043341496
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v2
with:
image: tonistiigi/binfmt:qemu-v6.2.0
platforms: amd64,arm64
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
with:
platforms: amd64,arm64
- name: Define docker image metadata
uses: docker/metadata-action@v4
id: meta
with:
images: muehlemannpopp/html-to-pdf
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha,prefix=git-,format=short
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/bake-action@v2
with:
push: true
files: |
./docker-bake.hcl
${{ steps.meta.outputs.bake-file }}
targets: build