diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3cfbbf57..9d75eb51 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -899,10 +899,12 @@ jobs: bash - name: Run changed-files with custom sha id: changed-files-custom-sha + if: github.event.action != 'closed' uses: ./ with: sha: ${{ github.event.pull_request.head.sha }} - name: Show output + if: github.event.action != 'closed' run: | echo '${{ toJSON(steps.changed-files-custom-sha.outputs) }}' shell: diff --git a/diff-sha.sh b/diff-sha.sh index ba69cf4f..27a60f10 100644 --- a/diff-sha.sh +++ b/diff-sha.sh @@ -135,7 +135,7 @@ else echo "Fetching remote refs..." git fetch --depth="$INPUT_FETCH_DEPTH" origin +refs/heads/"$TARGET_BRANCH":refs/remotes/origin/"$TARGET_BRANCH" - git branch --track "$TARGET_BRANCH" origin/"$TARGET_BRANCH" || true + git branch --track "$TARGET_BRANCH" origin/"$TARGET_BRANCH" 2>/dev/null || true depth=$INPUT_FETCH_DEPTH