Skip to content

Commit

Permalink
Only invalidate Nix if we need to
Browse files Browse the repository at this point in the history
  • Loading branch information
Baltoli committed Mar 7, 2024
1 parent c4bc2b9 commit 1444398
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/update-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,20 @@ jobs:
- name: 'Update scala-kore release tag'
run: |
set -euxo pipefail
SCALA_KORE_VERSION="$(cat matching/deps/scala_kore_release)"
changed=false
sed -i 's!^ <scala-kore.version>.*</scala-kore.version>$! <scala-kore.version>'"${SCALA_KORE_VERSION}"'</scala-kore.version>!' matching/pom.xml
git add matching/pom.xml && git commit -m "matching: update scala-kore to ${SCALA_KORE_VERSION}" || true
if git add matching/pom.xml && git commit -m "matching: update scala-kore to ${SCALA_KORE_VERSION}"; then
changed=true
fi
- name: 'Invalidate Nix Maven hash'
run:
sed -i 's! mvnHash = "sha256-.*";! mvnHash = "";!' nix/overlay.nix
git add nix/overlay.nix && git commit -m "nix: invalidate maven packages hash" || true
if [ "${changed}" = "true" ]; then
sed -i 's! mvnHash = "sha256-.*";! mvnHash = "";!' nix/overlay.nix
git add nix/overlay.nix && git commit -m "nix: invalidate maven packages hash" || true
fi
- name: 'Push updates'
run: git push

0 comments on commit 1444398

Please sign in to comment.