4
4
release :
5
5
types : [published]
6
6
workflow_dispatch :
7
+ inputs :
8
+ tag :
9
+ description : ' Tag to build (leave empty for latest)'
10
+ required : false
11
+ default : ' '
7
12
8
13
permissions :
9
14
packages : write
15
20
runs-on : ubuntu-latest
16
21
if : github.repository_owner == 'bcgov'
17
22
steps :
18
- - uses : actions/checkout@v4
23
+ - uses : actions/checkout@v4
24
+ with :
25
+ fetch-depth : 0
26
+ ref : ${{ github.event.inputs.tag || github.ref }}
19
27
20
28
- name : Set up Docker Buildx
21
29
uses : docker/setup-buildx-action@v3
@@ -33,10 +41,10 @@ jobs:
33
41
with :
34
42
images : ghcr.io/${{ github.repository }}/aries-vcr-agent
35
43
tags : |
44
+ type=raw,value=${{ github.event.inputs.tag }}
36
45
type=semver,pattern={{version}}
37
46
type=semver,pattern={{major}}.{{minor}}
38
- type=ref
39
- type=sha
47
+ type=ref,event=tag
40
48
41
49
- name : Build and push image
42
50
id : builder
53
61
runs-on : ubuntu-latest
54
62
if : github.repository_owner == 'bcgov'
55
63
steps :
56
- - uses : actions/checkout@v4
64
+ - uses : actions/checkout@v4
65
+ with :
66
+ fetch-depth : 0
67
+ ref : ${{ github.event.inputs.tag || github.ref }}
57
68
58
69
- name : Login to GitHub Container Registry
59
70
uses : docker/login-action@v3
@@ -68,10 +79,10 @@ jobs:
68
79
with :
69
80
images : ghcr.io/${{ github.repository }}/aries-vcr-api
70
81
tags : |
82
+ type=raw,value=${{ github.event.inputs.tag }}
71
83
type=semver,pattern={{version}}
72
84
type=semver,pattern={{major}}.{{minor}}
73
- type=ref
74
- type=sha
85
+ type=ref,event=tag
75
86
76
87
- name : Setup and build
77
88
id : build_image
@@ -96,7 +107,10 @@ jobs:
96
107
runs-on : ubuntu-latest
97
108
if : github.repository_owner == 'bcgov'
98
109
steps :
99
- - uses : actions/checkout@v4
110
+ - uses : actions/checkout@v4
111
+ with :
112
+ fetch-depth : 0
113
+ ref : ${{ github.event.inputs.tag || github.ref }}
100
114
101
115
- name : Login to GitHub Container Registry
102
116
uses : docker/login-action@v3
@@ -111,10 +125,10 @@ jobs:
111
125
with :
112
126
images : ghcr.io/${{ github.repository }}/aries-vcr-db
113
127
tags : |
128
+ type=raw,value=${{ github.event.inputs.tag }}
114
129
type=semver,pattern={{version}}
115
130
type=semver,pattern={{major}}.{{minor}}
116
- type=ref
117
- type=sha
131
+ type=ref,event=tag
118
132
119
133
- name : Setup and build
120
134
id : build_image
@@ -139,7 +153,10 @@ jobs:
139
153
runs-on : ubuntu-latest
140
154
if : github.repository_owner == 'bcgov'
141
155
steps :
142
- - uses : actions/checkout@v4
156
+ - uses : actions/checkout@v4
157
+ with :
158
+ fetch-depth : 0
159
+ ref : ${{ github.event.inputs.tag || github.ref }}
143
160
144
161
- name : Login to GitHub Container Registry
145
162
uses : docker/login-action@v3
@@ -154,10 +171,10 @@ jobs:
154
171
with :
155
172
images : ghcr.io/${{ github.repository }}/aries-vcr-solr
156
173
tags : |
174
+ type=raw,value=${{ github.event.inputs.tag }}
157
175
type=semver,pattern={{version}}
158
176
type=semver,pattern={{major}}.{{minor}}
159
- type=ref
160
- type=sha
177
+ type=ref,event=tag
161
178
162
179
- name : Setup and build
163
180
id : build_image
0 commit comments