File tree Expand file tree Collapse file tree 1 file changed +27
-4
lines changed Expand file tree Collapse file tree 1 file changed +27
-4
lines changed Original file line number Diff line number Diff line change 4
4
workflow_dispatch :
5
5
schedule :
6
6
- cron : " 0 0 * * *"
7
+ push :
8
+ tags :
9
+ - ' v*.*.*'
7
10
8
11
jobs :
9
12
build :
@@ -36,10 +39,15 @@ jobs:
36
39
password : ${{ secrets.GH_TOKEN }}
37
40
38
41
- name : Build Meta
39
- run : echo "::set-output name=dtag::ghcr.io/barelyhuman/goblin:nightly-${{ steps.date.outputs.date }}"
40
- id : meta
42
+ run : |
43
+ echo "::set-output name=dtag::ghcr.io/barelyhuman/goblin:nightly-${{ steps.date.outputs.date }}"
41
44
42
- - name : Build and push
45
+ - name : Build Release Meta
46
+ run : |
47
+ echo "::set-output name=rtag::ghcr.io/barelyhuman/goblin:${{ github.ref_name }}"
48
+ if : github.ref_type == 'tag'
49
+
50
+ - name : Build and push nightly
43
51
uses : docker/build-push-action@v5
44
52
id : push
45
53
env :
52
60
platforms : linux/amd64,linux/arm64
53
61
push : true
54
62
tags : ${{ steps.meta.outputs.dtag }}
55
-
63
+
64
+ - name : Build and push nightly
65
+ if : github.ref_type == 'tag'
66
+ uses : docker/build-push-action@v5
67
+ id : push
68
+ env :
69
+ REGISTRY : ghcr.io
70
+ OWNER : ${{ github.repository_owner }}
71
+ IMAGE_NAME : ${{ github.repository }}
72
+ with :
73
+ context : .
74
+ file : Dockerfile
75
+ platforms : linux/amd64,linux/arm64
76
+ push : true
77
+ tags : ${{ steps.meta.outputs.rtag }}
78
+
56
79
- name : Generate artifact attestation
57
80
uses : actions/attest-build-provenance@v1
58
81
with :
You can’t perform that action at this time.
0 commit comments