diff --git a/action.yml b/action.yml index 3e39fd1..32ae5b3 100644 --- a/action.yml +++ b/action.yml @@ -87,6 +87,27 @@ inputs: Only works with PyPI and TestPyPI via Trusted Publishing. required: false default: 'true' + action_path: + description: >- + [EXPERIMENTAL] + Set action path to work around bug in nested composite actions + https://github.com/actions/runner/issues/2473 + required: false + default: ${{ github.action_path }} + action_repository: + description: >- + [EXPERIMENTAL] + Set action repository to work around bug in nested composite actions + https://github.com/actions/runner/issues/2473 + required: false + default: ${{ github.action_repository }} + action_ref: + description: >- + [EXPERIMENTAL] + Set action ref to work around bug in nested composite actions + https://github.com/actions/runner/issues/2473 + required: false + default: ${{ github.action_ref }} branding: color: yellow icon: upload-cloud @@ -116,6 +137,7 @@ runs: run: | # Set repo and ref from which to run Docker container action # to handle cases in which `github.action_` context is not set + # or set properly for nested composite actions # https://github.com/actions/runner/issues/2473 REF=${{ env.ACTION_REF || env.PR_REF || github.ref_name }} REPO=${{ env.ACTION_REPO || env.PR_REPO || github.repository }} @@ -125,8 +147,8 @@ runs: echo "repo-id=$REPO_ID" >>"$GITHUB_OUTPUT" shell: bash env: - ACTION_REF: ${{ github.action_ref }} - ACTION_REPO: ${{ github.action_repository }} + ACTION_REF: ${{ inputs.action_ref }} + ACTION_REPO: ${{ inputs.action_repository }} PR_REF: ${{ github.event.pull_request.head.ref }} PR_REPO: ${{ github.event.pull_request.head.repo.full_name }} PR_REPO_ID: ${{ github.event.pull_request.base.repo.id }} @@ -149,7 +171,7 @@ runs: steps.pre-installed-python.outputs.python-path == '' && steps.new-python.outputs.python-path || steps.pre-installed-python.outputs.python-path - }} '${{ github.action_path }}/create-docker-action.py' + }} '${{ inputs.action_path }}/create-docker-action.py' env: REF: ${{ steps.set-repo-and-ref.outputs.ref }} REPO: ${{ steps.set-repo-and-ref.outputs.repo }}