Skip to content

Commit

Permalink
feat(workflows/sync-upstream): add sync-vendor-hash step (#83) (#84)
Browse files Browse the repository at this point in the history
Co-authored-by: Sumire (菫) <[email protected]>
  • Loading branch information
github-actions[bot] and sumire88 authored Sep 4, 2024
1 parent 23c1cb7 commit fc47e96
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/sync-upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ jobs:
./$project/metadata.json | tee ./$project/metadata.json.tmp
# Replace the original file
mv ./$project/{metadata.json.tmp,metadata.json}
# Update vendorHash
vendor=$(nix --log-format raw build .#$project 2>&1 | grep "got: " | awk '/got: / {print $NF}' || echo "")
jq --arg vendor "$vendor" \
'.vendorHash = $vendor' \
./$project/metadata.json | tee ./$project/metadata.json.tmp
mv ./$project/{metadata.json.tmp,metadata.json}
- name: Commit changes and push
uses: EndBug/add-and-commit@main
Expand Down

0 comments on commit fc47e96

Please sign in to comment.