File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,12 @@ on: # yamllint disable-line rule:truthy
6
6
pull_request :
7
7
push :
8
8
branches : ["release/*", "unstable/*"]
9
- tags : ["*"]
9
+ workflow_dispatch :
10
+ inputs :
11
+ tag :
12
+ description : Docker image tag
13
+ required : true
14
+ type : string
10
15
11
16
jobs :
12
17
build-and-push :
@@ -16,12 +21,14 @@ jobs:
16
21
- uses : actions/checkout@v4
17
22
- name : Build Docker image
18
23
run : |
19
- IMAGE="ghcr.io/$GITHUB_REPOSITORY:${GITHUB_REF_NAME /'/'/'-'}"
24
+ IMAGE="ghcr.io/$GITHUB_REPOSITORY:${DOCKER_TAG /'/'/'-'}"
20
25
echo "IMAGE=$IMAGE" >>"$GITHUB_ENV"
21
26
docker build . \
22
27
--build-arg BUILDKIT_INLINE_CACHE=1 \
23
28
--cache-from $IMAGE \
24
29
--tag $IMAGE
30
+ env :
31
+ DOCKER_TAG : ${{ inputs.tag || github.ref_name }}
25
32
- name : Log in to GHCR
26
33
if : github.event_name != 'pull_request'
27
34
run : >-
You can’t perform that action at this time.
0 commit comments