From e6add1bb9665c69e0a5043ef80ccfc0292a3356d Mon Sep 17 00:00:00 2001 From: "Henrique F. Simoes" Date: Wed, 13 Mar 2024 15:19:16 -0300 Subject: [PATCH] ci: use valid tag name for pull request events. GitHub context variable `ref_name` has an invalid pattern (`/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.") --- .github/workflows/ioc-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ioc-images.yml b/.github/workflows/ioc-images.yml index cdc4c22..1dd3a74 100644 --- a/.github/workflows/ioc-images.yml +++ b/.github/workflows/ioc-images.yml @@ -11,7 +11,7 @@ jobs: env: REGISTRY: ghcr.io/${{ github.repository_owner }} SOURCE: https://github.com/${{ github.repository }} - TAG: ${{ github.ref_name }} + TAG: ${{ github.event_name == 'push' && github.ref_name || github.head_ref }} steps: - uses: actions/checkout@v4 with: