Skip to content

Commit

Permalink
ci: only trigger NUR update once
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhys-T committed Nov 14, 2024
1 parent 8451294 commit a7b75ea
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ jobs:
matrix: ${{ fromJson(needs.define-matrix.outputs.matrix) }}
name: ${{ matrix.displayRunner }} - ${{ matrix.nixpkgs }} - ${{ matrix.subset }}
runs-on: ${{ matrix.runner }}
outputs:
nurRepo: ${{ steps.build.outputs.nurRepo }}
steps:
- name: Output nurRepo for final job
run: echo 'nurRepo=${{ matrix.nurRepo }}' >> "$GITHUB_OUTPUT"
- name: Checkout repository
uses: actions/checkout@v4
- name: Install qemu-user-static
Expand Down Expand Up @@ -98,6 +102,7 @@ jobs:
-I nixpkgs=$(nix-instantiate --find-file nixpkgs) \
-I $PWD
- name: Build nix packages
id: build
# run: nix shell -f '<nixpkgs>' nix-build-uncached -c nix-build-uncached ci.nix -A cacheOutputs
run: nix shell -f '.' nix-build-uncached-logging -c nix-build-uncached ci.nix --keep-going ${{ matrix.qemuSystem && format('--argstr platform {0}', matrix.qemuSystem) }} --argstr subsetName ${{ matrix.subset }} -A cacheOutputs
# - name: Upload debug info
Expand All @@ -108,7 +113,12 @@ jobs:
# path: |
# /nix/store/*fcntlPathTest*.drv
# if-no-files-found: ignore
trigger-update:
name: Trigger NUR update
runs-on: ubuntu-latest
needs: tests
steps:
- name: Trigger NUR update
# Don't replace <YOUR_REPO_NAME> here!
if: ${{ matrix.nurRepo != '<YOUR_REPO_NAME>' }}
run: curl -XPOST "https://nur-update.nix-community.org/update?repo=${{ matrix.nurRepo }}"
if: ${{ needs.tests.outputs.nurRepo != '<YOUR_REPO_NAME>' }}
run: curl -XPOST "https://nur-update.nix-community.org/update?repo=${{ needs.tests.outputs.nurRepo }}"

0 comments on commit a7b75ea

Please sign in to comment.