diff --git a/.github/workflows/nix-build.yml b/.github/workflows/nix-build.yml index 45db0b5e..33ee5cac 100644 --- a/.github/workflows/nix-build.yml +++ b/.github/workflows/nix-build.yml @@ -18,12 +18,13 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ github.ref }} + submodules: recursive - - uses: cachix/install-nix-action@v25 + - uses: cachix/install-nix-action@v26 - uses: DeterminateSystems/magic-nix-cache-action@main - uses: cachix/cachix-action@v12 with: name: hyprland authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - - run: nix build .#${{ matrix.package }} --extra-substituters "https://hyprland.cachix.org" -L + - run: nix build '.?submodules=1#${{ matrix.package }}' -L --extra-substituters "https://hyprland.cachix.org" diff --git a/.github/workflows/nix-ci.yml b/.github/workflows/nix-ci.yml index f0de7f5c..3b017576 100644 --- a/.github/workflows/nix-ci.yml +++ b/.github/workflows/nix-ci.yml @@ -3,13 +3,12 @@ name: Nix on: [push, pull_request, workflow_dispatch] jobs: - wlroots: - if: github.event_name != 'pull_request' - uses: ./.github/workflows/nix-update-wlroots.yml + update-inputs: + uses: ./.github/workflows/nix-update-inputs.yml secrets: inherit build: if: always() && !cancelled() && !contains(needs.*.result, 'failure') - needs: wlroots + needs: update-inputs uses: ./.github/workflows/nix-build.yml secrets: inherit diff --git a/.github/workflows/nix-update-inputs.yml b/.github/workflows/nix-update-inputs.yml index f5df3f4f..000900d9 100644 --- a/.github/workflows/nix-update-inputs.yml +++ b/.github/workflows/nix-update-inputs.yml @@ -1,8 +1,10 @@ name: Nix on: - schedule: - - cron: '0 0 * * *' # check daily + workflow_call: + secrets: + PAT: + required: true jobs: update: @@ -22,8 +24,3 @@ jobs: uses: stefanzweifel/git-auto-commit-action@v4 with: commit_message: "[gha] Nix: update inputs" - - update-build: - needs: update - uses: ./.github/workflows/nix-build.yml - secrets: inherit diff --git a/.github/workflows/nix-update-wlroots.yml b/.github/workflows/nix-update-wlroots.yml deleted file mode 100644 index a0db9ef5..00000000 --- a/.github/workflows/nix-update-wlroots.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Nix - -on: - workflow_call: - secrets: - PAT: - required: true - -jobs: - update: - name: wlroots - runs-on: ubuntu-latest - steps: - - name: Clone repository - uses: actions/checkout@v3 - with: - token: ${{ secrets.PAT }} - - - uses: DeterminateSystems/nix-installer-action@main - - name: Update lockfile - run: nix/update-wlroots.sh - - - name: Commit - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: "[gha] Nix: update wlroots"