From fc47e96e6c81498d090738941bbcdc39d920997b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 10:03:59 -0400 Subject: [PATCH] feat(workflows/sync-upstream): add sync-vendor-hash step (#83) (#84) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sumire (菫) <151038614+sumire88@users.noreply.github.com> --- .github/workflows/sync-upstream.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/sync-upstream.yml b/.github/workflows/sync-upstream.yml index bd60234..56a9b94 100644 --- a/.github/workflows/sync-upstream.yml +++ b/.github/workflows/sync-upstream.yml @@ -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