ci(zen-update): add job to test builds
This commit is contained in:
28
.github/workflows/zen-update.yml
vendored
28
.github/workflows/zen-update.yml
vendored
@@ -24,6 +24,7 @@ jobs:
|
||||
|
||||
- name: Install Nix
|
||||
if: steps.check.outputs.should_update == 'true'
|
||||
# TODO: they're @ v31 so next time let's try DeterminateSystems/nix-installer-action@main
|
||||
uses: cachix/install-nix-action@v27
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixpkgs-unstable
|
||||
@@ -41,8 +42,35 @@ jobs:
|
||||
.github/update.sh --ci
|
||||
|
||||
- name: Commit changes
|
||||
id: commit
|
||||
if: steps.check.outputs.should_update == 'true'
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: "${{ steps.update.outputs.commit_message }}"
|
||||
file_pattern: "*"
|
||||
outputs:
|
||||
success: ${{ steps.update.outputs.should_update }}
|
||||
|
||||
test-build:
|
||||
if: needs.update-zen-browser.outputs.success == 'true'
|
||||
continue-on-error: false
|
||||
name: Test package build
|
||||
runs-on: ubuntu-latest
|
||||
needs: update-zen-browser
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v27
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixpkgs-unstable
|
||||
|
||||
- name: Setup Nix Magic Cache
|
||||
uses: DeterminateSystems/flakehub-cache-action@main
|
||||
|
||||
- name: Build packages
|
||||
run: |
|
||||
for package in $(nix flake show --json 2>/dev/null | jq -r '.packages.["x86_64-linux"] | keys | .[]'); do
|
||||
nix build --system 'x86_64-linux' ".#$package"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user