Skip to content

Commit a4d024b

Browse files
committed
prod image version fix
1 parent defac24 commit a4d024b

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/build_prod_container.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
name: Create Prod Image
2-
on:
3-
release:
4-
types: [published]
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
image_tag:
6+
description: 'Image tag'
7+
required: true
58

69
jobs:
710
check-release:
@@ -16,7 +19,7 @@ jobs:
1619

1720
- name: Set Image Tag
1821
id: itag
19-
run: echo "itag=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
22+
run: echo "itag=${{ github.event.inputs.image_tag }}" >> $GITHUB_OUTPUT
2023

2124
- name: Check Release Tag
2225
run: |
@@ -28,7 +31,7 @@ jobs:
2831
2932
- name: Check Cargo.toml Version
3033
run: |
31-
CARGO_VERSION=$(grep '^version =' Cargo.toml | sed 's/version = "\(.*\)"/\1/')
34+
CARGO_VERSION=$(awk '/\[package\]/ {flag=1} flag && /version =/ {print $3; flag=0}' Cargo.toml | sed 's/"//g')
3235
TAG_VERSION=${{ steps.itag.outputs.itag }}
3336
TAG_VERSION=${TAG_VERSION#"v"} # Remove the leading 'v' from the tag
3437

0 commit comments

Comments
 (0)