From df936e3365f994db4e5e0683d7e3cd97b9f37768 Mon Sep 17 00:00:00 2001 From: Jason N <33561705+JasonN3@users.noreply.github.com> Date: Mon, 11 Mar 2024 17:08:54 -0400 Subject: [PATCH] Fix var reference (#56) --- action.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index bc6c0bf..09c4b84 100644 --- a/action.yml +++ b/action.yml @@ -122,18 +122,21 @@ runs: mkdir /cache/skopeo || true - name: Run docker image + env: + ACTION_REPO: ${{ github.action_repository }} + ACTION_REF: ${{ github.action_ref }} shell: bash run: | # Check if running inside of the action repo - if [[ -z "${{ github.action_repository }}" ]] + if [[ -z "${ACTION_REPO}" || "${ACTION_REPO}" == "${{ github.repository }}" ]] then if [[ "${{ github.ref_name }}" =~ (.*)/merge ]] then tag=pr-${BASH_REMATCH[1]} else - tag=${{ github.ref_name }} + tag=${ACTION_REF} fi else - tag=${{ github.action_ref }} + tag=${ACTION_REF} fi if [[ "${{ inputs.enable_cache_dnf }}" == "true" ]] then