-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move size determination to after commit
- Loading branch information
1 parent
fbd6027
commit 993d28e
Showing
1 changed file
with
4 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,14 +31,15 @@ jobs: | |
env: | ||
GITHUB_TOKEN: ${{ secrets.PAT }} | ||
run: | | ||
git config user.name "GitHub Actions Bot" | ||
git config user.email "<[email protected]>" | ||
git commit -m "chore(ci): updated test file runtime file" .ci/runtimes.json | ||
FIRST_LINE=$(git diff-tree -r -c -M -C --no-commit-id HEAD | head -n 1) | ||
BLOB_HASH=$(echo $FIRST_LINE | awk '{print $4}') | ||
SIZE=$(echo $BLOB_HASH | git cat-file --batch-check | grep "blob" | awk '{ print $3 }') | ||
PRINTABLE_SIZE=$(numfmt --to=iec --suffix=B --format="%.1f" "$SIZE") | ||
git config user.name "GitHub Actions Bot" | ||
git config user.email "<[email protected]>" | ||
git commit -m "chore(ci): updated test file runtime file" .ci/runtimes.json | ||
git push -f origin HEAD:chore/update-runtimes | ||
gh pr create --title "chore(ci): update test runtimes" \ | ||
--body "This PR updates the test runtimes file to incorporate latest statistics for better scheduling. It increases the repository size by $PRINTABLE_SIZE" \ | ||
|