-
Notifications
You must be signed in to change notification settings - Fork 2
73 lines (63 loc) · 1.89 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Release version
#on:
# push:
# branches:
# - 'main'
# tags:
# - 'v*'
on: pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
shell: bash
working-directory: tooling
- name: Restore yarn cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
restore-keys: |
yarn-cache-folder-
# 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