From 09d8ea071d14ff69cd96d567a7af68173289fa5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jalil=20David=20Salam=C3=A9=20Messina?= Date: Wed, 18 Dec 2024 22:03:13 +0100 Subject: [PATCH] fix(action): unpack outside git repo Otherwise it thinks it is the original flake --- action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 9e98fc5..f2741f7 100644 --- a/action.yml +++ b/action.yml @@ -101,13 +101,13 @@ runs: if [ "$PRIVATE_REPO" = 'true' ]; then log "In a private repo, downloading $HEAD_BRANCH to build the old report" - mkdir -p old + old=$(mktemp -d) curl -X 'GET' \ "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/archive/$HEAD_BRANCH.tar.gz" \ -H "Authorization: token $GITHUB_TOKEN" | - tar -zvx --strip-components=1 -C old + tar -zvx --strip-components=1 -C "$old" - (cd old && "$GITHUB_ACTION_PATH/create-report.sh") > old-report.json + (cd "$old" && "$GITHUB_ACTION_PATH/create-report.sh") > old-report.json log "Reporting on sizes and comparing to sizes in $HEAD_BRANCH" "$GITHUB_ACTION_PATH/comment_on_pr.sh" report.json old-report.json