fix(action): unpack outside git repo
Otherwise it thinks it is the original flake
This commit is contained in:
parent
20b96580ba
commit
09d8ea071d
1 changed files with 3 additions and 3 deletions
|
@ -101,13 +101,13 @@ runs:
|
||||||
if [ "$PRIVATE_REPO" = 'true' ]; then
|
if [ "$PRIVATE_REPO" = 'true' ]; then
|
||||||
log "In a private repo, downloading $HEAD_BRANCH to build the old report"
|
log "In a private repo, downloading $HEAD_BRANCH to build the old report"
|
||||||
|
|
||||||
mkdir -p old
|
old=$(mktemp -d)
|
||||||
curl -X 'GET' \
|
curl -X 'GET' \
|
||||||
"$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/archive/$HEAD_BRANCH.tar.gz" \
|
"$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/archive/$HEAD_BRANCH.tar.gz" \
|
||||||
-H "Authorization: token $GITHUB_TOKEN" |
|
-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"
|
log "Reporting on sizes and comparing to sizes in $HEAD_BRANCH"
|
||||||
"$GITHUB_ACTION_PATH/comment_on_pr.sh" report.json old-report.json
|
"$GITHUB_ACTION_PATH/comment_on_pr.sh" report.json old-report.json
|
||||||
|
|
Loading…
Reference in a new issue