From 3179f40372725cf9a253bbc5ca4574f9c83b6d7d Mon Sep 17 00:00:00 2001 From: Noel Miller Date: Mon, 11 Mar 2024 12:37:00 -0500 Subject: [PATCH] fix: #54 --- action.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index d4e7861..2b6b4e9 100644 --- a/action.yml +++ b/action.yml @@ -78,8 +78,16 @@ runs: shell: bash run: | # Check if running inside of the action repo - if [[ -z "${{ github.action_ref }}" ]]; then if [[ "${{ github.ref_name }}" =~ (.*)/merge ]]; then tag=pr-${BASH_REMATCH[1]}; else tag=${{ github.ref_name }}; fi; fi - if [[ -z "${tag}" ]]; then tag=${{ github.action_ref }}; fi + if [[ -z "${{ github.action_repository }}" ]] + then + if [[ "${{ github.ref_name }}" =~ (.*)/merge ]] + then tag=pr-${BASH_REMATCH[1]} + else + tag=${{ github.ref_name }} + fi + else + tag=${{ github.action_ref }} + fi docker run --privileged --volume ${{ github.workspace }}:/github/workspace ghcr.io/jasonn3/build-container-installer:${tag} \ ADDITIONAL_TEMPLATES="${{ inputs.additional_templates }}" \ ARCH=${{ inputs.arch }} \