Skip to content

Commit d595fd1

Browse files
ci: use valid tag name for pull request events.
GitHub context variable `ref_name` has an invalid pattern (`<pr>/merge`) for container image tags when events are generated by pull requests. In such cases, `head_ref` should be used in the IOC build workflow instead. Fixes: 4cd3893 ("ci: add reusable job for IOC images.")
1 parent 95df0a5 commit d595fd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/ioc-images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
env:
1212
REGISTRY: ghcr.io/${{ github.repository_owner }}
1313
SOURCE: https://github.com/${{ github.repository }}
14-
TAG: ${{ github.ref_name }}
14+
TAG: ${{ github.event_name == 'push' && github.ref_name || github.head_ref }}
1515
steps:
1616
- uses: actions/checkout@v4
1717
with:

0 commit comments

Comments
 (0)