@@ -32,13 +32,17 @@ jobs:
32
32
33
33
- name : Compute implementation name
34
34
id : impl
35
- run : echo "name=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_OUTPUT
35
+ env :
36
+ GH_REPOSITORY : ${{ github.repository }}
37
+ run : echo "name=$(echo '${GH_REPOSITORY}' | awk -F '/' '{print $2}')" >> $GITHUB_OUTPUT
36
38
37
39
- name : Compute latest implementation version
38
40
id : version
41
+ env :
42
+ IMPL_NAME : ${{ steps.impl.outputs.name }}
39
43
run : |
40
44
version=$(bowtie info \
41
- --implementation ${{ steps.impl.outputs.name } } \
45
+ --implementation ${IMPL_NAME } \
42
46
--format json | jq -r '.version // empty')
43
47
echo "value=${version}" >> $GITHUB_OUTPUT
44
48
@@ -88,20 +92,27 @@ jobs:
88
92
enable-cache : true
89
93
90
94
- name : Smoke Test
95
+ env :
96
+ IMAGE_WITH_TAG : ${{ steps.build_image.outputs.image-with-tag }}
91
97
run : |
92
- bowtie smoke -i "localhost/${{ steps.build_image.outputs.image-with-tag } }" --format json
93
- bowtie smoke -i "localhost/${{ steps.build_image.outputs.image-with-tag } }" --format markdown >> $GITHUB_STEP_SUMMARY
98
+ bowtie smoke -i "localhost/${IMAGE_WITH_TAG }" --format json
99
+ bowtie smoke -i "localhost/${IMAGE_WITH_TAG }" --format markdown >> $GITHUB_STEP_SUMMARY
94
100
95
101
- name : Collect current version
96
102
id : current-version
103
+ env :
104
+ IMAGE_WITH_TAG : ${{ steps.build_image.outputs.image-with-tag }}
97
105
run : |
98
106
version=$(bowtie info \
99
- --implementation "localhost/${{ steps.build_image.outputs.image-with-tag } }" \
107
+ --implementation "localhost/${IMAGE_WITH_TAG }" \
100
108
--format json | jq -r '.version // empty')
101
109
echo "value=${version}" >> $GITHUB_OUTPUT
102
110
103
111
- name : Print collected versions
104
- run : echo "latest_version=${{ needs.meta.outputs.latest-version }}; current_version=${{ steps.current-version.outputs.value }}"
112
+ env :
113
+ LATEST_VERSION : ${{ needs.meta.outputs.latest-version }}
114
+ CURRENT_VERSION : ${{ steps.current-version.outputs.value }}
115
+ run : echo "latest_version=${LATEST_VERSION}; current_version=${CURRENT_VERSION}"
105
116
106
117
- name : Log in to ghcr.io
107
118
uses : redhat-actions/podman-login@v1
@@ -112,7 +123,10 @@ jobs:
112
123
if : github.event_name == 'push' && github.ref == 'refs/heads/main'
113
124
114
125
- name : Add tag with version to the image
115
- run : podman tag ${{ steps.build_image.outputs.image-with-tag }} ${{ steps.build_image.outputs.image }}:${{ steps.current-version.outputs.value }}
126
+ env :
127
+ IMAGE_WITH_TAG : ${{ steps.build_image.outputs.image-with-tag }}
128
+ IMAGE_WITH_VERSION : " ${{ steps.build_image.outputs.image }}:${{ steps.current-version.outputs.value }}"
129
+ run : podman tag ${IMAGE_WITH_TAG} ${IMAGE_WITH_VERSION}
116
130
if : github.event_name == 'push' && github.ref == 'refs/heads/main'
117
131
118
132
- name : Publish
@@ -144,6 +158,7 @@ jobs:
144
158
env :
145
159
TAG : v${{ needs.meta.outputs.latest-version }}
146
160
COMMIT : ${{ github.event.before }}
161
+ GH_REPOSITORY : ${{ github.repository }}
147
162
148
163
steps :
149
164
@@ -156,7 +171,7 @@ jobs:
156
171
--method POST
157
172
-H "Accept: application/vnd.github+json"
158
173
-H "X-GitHub-Api-Version: 2022-11-28"
159
- /repos/${{ github.repository } }/git/refs
174
+ /repos/${GH_REPOSITORY }/git/refs
160
175
-f "ref=refs/tags/$TAG"
161
176
-f "sha=$COMMIT"
162
177
@@ -168,7 +183,7 @@ jobs:
168
183
--method POST
169
184
-H "Accept: application/vnd.github+json"
170
185
-H "X-GitHub-Api-Version: 2022-11-28"
171
- /repos/${{ github.repository } }/releases
186
+ /repos/${GH_REPOSITORY }/releases
172
187
-f "tag_name=$TAG"
173
188
-f "name=$TAG"
174
189
-f "body=Automatic release for $TAG"
0 commit comments