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 9d40504
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/nix-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Nix CI
on:
push:
pull_request:
jobs:
check-hashes:
name: Ensure Nix Hashes are up-to-date
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install nix
uses: cachix/install-nix-action@v22

- name: Prepare Nix shell
run: nix develop --impure .#ci

- name: Update npm Hashes
working-directory: nix/package/web
run: nix develop --impure .#ci --command "./update.sh"

- name: Update Composer Hashes
working-directory: nix/package
run: nix develop --impure .#ci --command "./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
4 changes: 3 additions & 1 deletion nix/shell.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{...}: {
perSystem = {
config,
pkgs,
lib,
...
}: {
}: rec {
devenv.shells.ci = devenv.shells.default;
devenv.shells.default = {
config,
inputs,
Expand Down

0 comments on commit 9d40504

Please sign in to comment.