Skip to content

Commit 31b8674

Browse files
committed
Improve docker build workflow
- build develop branch & allow arbitrary branches to be built - implement caching
1 parent 5513138 commit 31b8674

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/release-build.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
name: Release Build
22
on:
33
push:
4+
branches:
5+
- develop
46
tags:
5-
- "*"
7+
- '*'
8+
workflow_dispatch:
69

710
jobs:
811
docker:
@@ -13,6 +16,9 @@ jobs:
1316
- name: Check out repo
1417
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1518

19+
- name: Setup Docker Buildx
20+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
21+
1622
- name: Login to Harbor
1723
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
1824
with:
@@ -33,4 +39,7 @@ jobs:
3339
file: ./Dockerfile
3440
push: true
3541
tags: ${{ steps.meta.outputs.tags }}
36-
labels: ${{ steps.meta.outputs.labels }}
42+
labels: ${{ steps.meta.outputs.labels }}
43+
annotations: ${{ steps.meta.outputs.annotations }}
44+
cache-from: type=gha,scope=prod
45+
cache-to: type=gha,scope=prod,mode=max

0 commit comments

Comments
 (0)