From a406fd05deeb431cbd929243d97af080127ccffe Mon Sep 17 00:00:00 2001 From: "Jason N." <33561705+JasonN3@users.noreply.github.com> Date: Fri, 1 Mar 2024 11:42:30 -0500 Subject: [PATCH] find tag --- action.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 9faf638..22681b8 100644 --- a/action.yml +++ b/action.yml @@ -43,7 +43,10 @@ runs: - name: Run docker image shell: bash run: | - docker run --privileged --volume .:/github/workspace/ ghcr.io/jasonn3/build-container-installer:${{ github.action_ref }} \ + # Check if running inside of the action repo + if [[ -z "${{ github.action_ref }}" ]]; then if [[ "${{ github.ref_name }}" =~ (.*)/merge ]]; then tag=${BASH_REMATCH[1]}; else tag=${{ github.ref_name }}; fi + if [[ -z "${tag}" ]]; then tag=${{ github.action_ref }}; fi + docker run --privileged --volume .:/github/workspace/ ghcr.io/jasonn3/build-container-installer:${tag} \ ARCH=${{ inputs.arch }} \ IMAGE_NAME=${{ inputs.image_name }} \ IMAGE_REPO=${{ inputs.image_repo }} \