From fd9564db5df9f7c3a80f676f89a44a6e84833668 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Fri, 6 Sep 2024 11:56:41 +0200 Subject: [PATCH] Return back to the original checkout SHA1 The upload-sarif action dislikes the change done by our rebase: | No longer on merge commit, rewriting ref from refs/pull/3401/merge to refs/pull/3401/head. | ... | Uploading results | Warning: commit not found | Error: commit not found --- container/cmd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/container/cmd b/container/cmd index e0ff328..b4b4d39 100755 --- a/container/cmd +++ b/container/cmd @@ -96,6 +96,9 @@ if test "$GITHUB_EVENT_NAME" = 'pull_request'; then for subdir in $INPUT_SUBDIRECTORIES; do analyze_subdir "$subdir" done + + # Return back to the previous git-sha1 + git checkout "$GITHUB_SHA" else touch "$rootdir/output.sarif.err" fi