Skip to content

Commit 43ce12e

Browse files
authored
Fetch PR base ref before checking it out (#31)
Unlike actions/checkout@v1, the actions/checkout@v2 action doesn't fetch the PR base branch. In order to determine the memory usage change, compile-examples must checkout the PR base branch. For this reason, before this change the compile-examples action with the deltas report feature enabled didn't work with a simple usage of actions/checkout@v2.
1 parent 91d8172 commit 43ce12e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ for SKETCH_PATH in "${SKETCH_PATHS_ARRAY[@]}"; do
246246
echo "::error::Unable to determine base branch name. Please specify the size-report-github-token argument in your workflow configuration."
247247
exit 1
248248
fi
249+
git fetch --no-tags --prune --depth=1 origin +"$BASE_BRANCH_NAME"
249250
git checkout "$BASE_BRANCH_NAME" || {
250251
echo "::error::Failed to checkout base branch"
251252
exit 1

0 commit comments

Comments
 (0)