Merge 8a35517545
into 15c56dba36
This commit is contained in:
commit
0c8d90ee6d
20
action.yml
20
action.yml
|
@ -87,6 +87,20 @@ inputs:
|
||||||
Only works with PyPI and TestPyPI via Trusted Publishing.
|
Only works with PyPI and TestPyPI via Trusted Publishing.
|
||||||
required: false
|
required: false
|
||||||
default: 'true'
|
default: 'true'
|
||||||
|
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:
|
branding:
|
||||||
color: yellow
|
color: yellow
|
||||||
icon: upload-cloud
|
icon: upload-cloud
|
||||||
|
@ -116,17 +130,19 @@ runs:
|
||||||
run: |
|
run: |
|
||||||
# Set repo and ref from which to run Docker container action
|
# Set repo and ref from which to run Docker container action
|
||||||
# to handle cases in which `github.action_` context is not set
|
# 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
|
# https://github.com/actions/runner/issues/2473
|
||||||
REF=${{ env.ACTION_REF || env.PR_REF || github.ref_name }}
|
REF=${{ env.ACTION_REF || env.PR_REF || github.ref_name }}
|
||||||
REPO=${{ env.ACTION_REPO || env.PR_REPO || github.repository }}
|
REPO=${{ env.ACTION_REPO || env.PR_REPO || github.repository }}
|
||||||
REPO_ID=${{ env.PR_REPO_ID || github.repository_id }}
|
REPO_ID=${{ env.PR_REPO_ID || github.repository_id }}
|
||||||
|
echo "action-path=$ACTION_PATH" >>"$GITHUB_OUTPUT"
|
||||||
echo "ref=$REF" >>"$GITHUB_OUTPUT"
|
echo "ref=$REF" >>"$GITHUB_OUTPUT"
|
||||||
echo "repo=$REPO" >>"$GITHUB_OUTPUT"
|
echo "repo=$REPO" >>"$GITHUB_OUTPUT"
|
||||||
echo "repo-id=$REPO_ID" >>"$GITHUB_OUTPUT"
|
echo "repo-id=$REPO_ID" >>"$GITHUB_OUTPUT"
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
ACTION_REF: ${{ github.action_ref }}
|
ACTION_REF: ${{ inputs.action_ref }}
|
||||||
ACTION_REPO: ${{ github.action_repository }}
|
ACTION_REPO: ${{ inputs.action_repository }}
|
||||||
PR_REF: ${{ github.event.pull_request.head.ref }}
|
PR_REF: ${{ github.event.pull_request.head.ref }}
|
||||||
PR_REPO: ${{ github.event.pull_request.head.repo.full_name }}
|
PR_REPO: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
PR_REPO_ID: ${{ github.event.pull_request.base.repo.id }}
|
PR_REPO_ID: ${{ github.event.pull_request.base.repo.id }}
|
||||||
|
|
Loading…
Reference in New Issue