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 }} \