File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -3,12 +3,24 @@ name: package
3
3
on :
4
4
push :
5
5
tags :
6
- - ' [0-9]+.[0-9]+.[0-9]+ '
6
+ - ' *.*.* '
7
7
workflow_dispatch :
8
+ # Run the workflow when the Release workflow completes
9
+ workflow_run :
10
+ workflows : ['Release']
11
+ types :
12
+ - completed
8
13
9
14
jobs :
10
15
build :
11
16
runs-on : ubuntu-latest
17
+ # Trigger the job only if the Release Tagging job was successful or manually triggered
18
+ if : ${{ startsWith(github.ref, 'refs/tags/') || github.event.workflow_run.conclusion == 'success' || github.event.ref == 'refs/heads/main' }}
19
+
20
+ env :
21
+ # Only push the image if the new tag is pushed or manually triggered
22
+ PUSH_CONDITION : ${{ startsWith(github.ref, 'refs/tags/') || github.event.workflow_run.conclusion == 'success' || github.ref == 'refs/heads/main' }}
23
+
12
24
steps :
13
25
- name : Checkout
14
26
uses : actions/checkout@v4
38
50
- name : Push Release
39
51
uses : docker/build-push-action@v5
40
52
with :
41
- push : ${{ startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/next' }}
53
+ push : ${{ env.PUSH_CONDITION }}
42
54
tags : ${{ steps.meta.outputs.tags }}
43
55
labels : ${{ steps.meta.outputs.labels }}
44
56
build-args : |
You can’t perform that action at this time.
0 commit comments