Skip to content

Commit f516217

Browse files
committed
fix(docker build): try gemini fixes to handle docker build on release
1 parent df5917e commit f516217

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

.github/workflows/build-docker-image.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
name: Build and Push Docker Image
22
on:
3-
release:
4-
types: [published]
3+
push:
4+
tags:
5+
- '*.*.*'
6+
workflow_dispatch:
7+
inputs:
8+
version:
9+
description: 'The version tag to build (e.g., v1.2.3)'
10+
required: true
511

612
jobs:
713
build-and-push:
@@ -14,6 +20,9 @@ jobs:
1420
steps:
1521
- name: Checkout repository
1622
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
23+
with:
24+
# On workflow_dispatch, checkout the tag passed in. On a tag push, checkout the tag from the event.
25+
ref: ${{ github.event.inputs.version || github.ref }}
1726

1827
- name: Log in to GitHub Container Registry
1928
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3
@@ -22,9 +31,9 @@ jobs:
2231
username: ${{ github.actor }}
2332
password: ${{ secrets.GITHUB_TOKEN }}
2433

25-
- name: Extract version from tag
34+
- name: Set version
2635
id: version
27-
run: echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
36+
run: echo "VERSION=${{ github.event.inputs.version || github.ref_name }}" >> $GITHUB_ENV
2837

2938
- name: Convert repository name to lowercase
3039
id: repo

.github/workflows/release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
with:
2525
persist-credentials: false
2626
- name: Semantic Release
27+
id: semantic
2728
uses: cycjimmy/semantic-release-action@9cc899c47e6841430bbaedb43de1560a568dfd16 # v5.0.0
2829
with:
2930
tag_format: ${version}
@@ -38,3 +39,13 @@ jobs:
3839
conventional-changelog-conventionalcommits
3940
env:
4041
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
- name: Trigger Docker Build
43+
if: steps.semantic.outputs.new_release_published == 'true'
44+
uses: benc-uk/workflow-dispatch@v1
45+
with:
46+
workflow: Build and Push Docker Image
47+
token: ${{ secrets.GITHUB_TOKEN }}
48+
inputs: >
49+
{
50+
"version": "${{ steps.semantic.outputs.new_release_git_tag }}"
51+
}

0 commit comments

Comments
 (0)