Skip to content

Commit b3d2e11

Browse files
committed
GITHUB_REF empty in release GitHub Action workflows
Try to work around [github.ref is empty for workflows triggered by release](actions/runner#2788) which can result in the `GITHUB_REF` being randomly empty for release workflows. Signed-off-by: Jean-Francois Panisset <panisset@gmail.com>
1 parent 23b323e commit b3d2e11

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
DOCKER_BUILDKIT: '1'
1313
CONAN_LOGIN_USERNAME: ${{ secrets.ARTIFACTORY_USER }}
1414
CONAN_PASSWORD: ${{ secrets.ARTIFACTORY_TOKEN }}
15+
GITHUB_REF_LOCAL: ${{ github.ref }}
1516

1617
strategy:
1718
matrix:
@@ -55,7 +56,7 @@ jobs:
5556
--repo-uri $GITHUB_REPOSITORY \
5657
--verbose \
5758
build \
58-
--full-name $GITHUB_REF \
59+
--full-name $GITHUB_REF_LOCAL \
5960
--push YES \
6061
${{ matrix.args }}
6162
@@ -66,4 +67,4 @@ jobs:
6667
pushoverview \
6768
--username aswfdocker \
6869
--password ${{ secrets.DOCKERHUB_PASSWORD }} \
69-
--full-name $GITHUB_REF
70+
--full-name $GITHUB_REF_LOCAL

0 commit comments

Comments
 (0)