chore: explicitly set the GITHUB_WORKSPACE environment variable (#505)
This commit is contained in:
parent
1c997727c9
commit
6b8ef3323f
@ -158,6 +158,7 @@ runs:
|
|||||||
GITHUB_BASE_REF: ${{ github.base_ref }}
|
GITHUB_BASE_REF: ${{ github.base_ref }}
|
||||||
GITHUB_HEAD_REF: ${{ github.head_ref }}
|
GITHUB_HEAD_REF: ${{ github.head_ref }}
|
||||||
GITHUB_ACTION_PATH: ${{ github.action_path }}
|
GITHUB_ACTION_PATH: ${{ github.action_path }}
|
||||||
|
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||||
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
|
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
|
||||||
# https://github.community/t/input-variable-name-is-not-available-in-composite-run-steps/127611
|
# https://github.community/t/input-variable-name-is-not-available-in-composite-run-steps/127611
|
||||||
INPUT_SHA: ${{ inputs.sha }}
|
INPUT_SHA: ${{ inputs.sha }}
|
||||||
@ -187,6 +188,7 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
GITHUB_ACTION_PATH: ${{ github.action_path }}
|
GITHUB_ACTION_PATH: ${{ github.action_path }}
|
||||||
|
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||||
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
|
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
|
||||||
# https://github.community/t/input-variable-name-is-not-available-in-composite-run-steps/127611
|
# https://github.community/t/input-variable-name-is-not-available-in-composite-run-steps/127611
|
||||||
INPUT_FILES_PATTERN_FILE: ${{ steps.glob.outputs.paths-output-file }}
|
INPUT_FILES_PATTERN_FILE: ${{ steps.glob.outputs.paths-output-file }}
|
||||||
|
@ -4,12 +4,12 @@ set -eu
|
|||||||
|
|
||||||
echo "::group::changed-files-diff-sha"
|
echo "::group::changed-files-diff-sha"
|
||||||
|
|
||||||
echo "Resolving repository path..."
|
|
||||||
|
|
||||||
if [[ -n $INPUT_PATH ]]; then
|
if [[ -n $INPUT_PATH ]]; then
|
||||||
REPO_DIR="$GITHUB_WORKSPACE/$INPUT_PATH"
|
REPO_DIR="$GITHUB_WORKSPACE/$INPUT_PATH"
|
||||||
|
|
||||||
|
echo "Resolving repository path: $REPO_DIR"
|
||||||
if [[ ! -d "$REPO_DIR" ]]; then
|
if [[ ! -d "$REPO_DIR" ]]; then
|
||||||
echo "::warning::Invalid repository path"
|
echo "::warning::Invalid repository path: $REPO_DIR"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
cd "$REPO_DIR"
|
cd "$REPO_DIR"
|
||||||
|
@ -52,12 +52,12 @@ function get_renames() {
|
|||||||
|
|
||||||
echo "::group::changed-files"
|
echo "::group::changed-files"
|
||||||
|
|
||||||
echo "Resolving repository path..."
|
|
||||||
|
|
||||||
if [[ -n $INPUT_PATH ]]; then
|
if [[ -n $INPUT_PATH ]]; then
|
||||||
REPO_DIR="$GITHUB_WORKSPACE/$INPUT_PATH"
|
REPO_DIR="$GITHUB_WORKSPACE/$INPUT_PATH"
|
||||||
|
|
||||||
|
echo "Resolving repository path: $REPO_DIR"
|
||||||
if [[ ! -d "$REPO_DIR" ]]; then
|
if [[ ! -d "$REPO_DIR" ]]; then
|
||||||
echo "::warning::Invalid repository path"
|
echo "::warning::Invalid repository path: $REPO_DIR"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
cd "$REPO_DIR"
|
cd "$REPO_DIR"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user