Skip to content

Commit c0bd139

Browse files
Merge pull request #69 from vmware-tanzu/release-tag
Generate release from tag
2 parents aac0ff7 + 2a755da commit c0bd139

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/actions/imgpkg-push/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ runs:
2727
- name: Extract version
2828
shell: bash
2929
run: |
30-
[[ $GITHUB_REF =~ ^refs\/heads\/release\/(.*)$ ]] && version=${BASH_REMATCH[1]} || version=${{ github.sha }}
30+
[[ $GITHUB_REF =~ ^refs\/tags\/v(.*)$ ]] && version=${BASH_REMATCH[1]} || version=${{ github.sha }}
3131
echo "VERSION=${version}" >> $GITHUB_ENV
3232
3333
- name: Create version overlay

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ jobs:
181181
- bundle
182182
- webhook-image
183183
- setup-ca-certs-image
184-
if: ${{ startsWith(github.ref, 'refs/heads/release/') }}
184+
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
185185
runs-on: ubuntu-latest
186186
steps:
187187
- name: Checkout
@@ -214,7 +214,7 @@ jobs:
214214
- name: Validate release version
215215
run: |
216216
echo "GITHUB_REF=${GITHUB_REF}"
217-
[[ $GITHUB_REF =~ ^refs\/heads\/release\/(.*)$ ]] && version=${BASH_REMATCH[1]}
217+
[[ $GITHUB_REF =~ ^refs\/tags\/v(.*)$ ]] && version=${BASH_REMATCH[1]}
218218
if [[ -z "${version}" ]]; then
219219
echo "ERROR: version not detected."
220220
exit 1

0 commit comments

Comments
 (0)