Skip to content

Commit 40ef141

Browse files
committed
fix: add manual release fallback
Allow an exact image version and latest-tag update to be dispatched for a release tag when GitHub does not emit the expected tag-push workflow run.
1 parent f75be40 commit 40ef141

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/docker_standalone_triggered_by_tag_push.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
name: Release standalone image
22

33
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: Docker image version without the v prefix
8+
required: true
9+
type: string
10+
publish_latest:
11+
description: Also update the latest tag
12+
required: true
13+
default: false
14+
type: boolean
415
push:
516
tags:
617
- 'v*'
@@ -60,8 +71,9 @@ jobs:
6071
with:
6172
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
6273
tags: |
63-
type=semver,pattern={{version}}
64-
type=raw,value=latest
74+
type=semver,pattern={{version}},enable=${{ github.event_name == 'push' }}
75+
type=raw,value=${{ inputs.version }},enable=${{ github.event_name == 'workflow_dispatch' }}
76+
type=raw,value=latest,enable=${{ github.event_name == 'push' || inputs.publish_latest }}
6577
type=sha,prefix=sha-
6678
6779
- name: Build and publish standalone image

0 commit comments

Comments
 (0)