-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
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 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
# - uses: cachix/cachix-action@v12 | ||
# with: | ||
# name: trawelling | ||
# authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | ||
|
||
- 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 | ||
build: | ||
name: Build Package | ||
runs-on: ubuntu-latest | ||
needs: | ||
- check-hashes | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install nix | ||
uses: cachix/install-nix-action@v22 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
# - uses: cachix/cachix-action@v12 | ||
# with: | ||
# name: trawelling | ||
# authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | ||
- name: Build with nix | ||
run: nix build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters