Skip to content

Commit

Permalink
add ensure hashes workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
NyCodeGHG committed Sep 2, 2023
1 parent 8df5a7a commit eb782ab
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ensure-nix-hashes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Ensure Nix Hashes are up-to-date
on:
push:
pull_request:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install nix
uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable

- name: Update npm Hashes
working-directory: nix/package/web
shell: nix develop --command bash -c "{0}"
run: ./update.sh
- name: Update Composer Hashes
working-directory: nix/package
shell: nix develop --command bash -c "{0}"
run: ./update.sh

- name: Check if up-to-date
shell: bash
run: |
if [ "$(git status --porcelain=v1 2>/dev/null | wc -l)" = "1" ]; then
git status
echo "::error::Nix hashes are not up to date"
fi

0 comments on commit eb782ab

Please sign in to comment.