From 981c71e60a4db9838e82dd721f0e5ae4981529aa Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Tue, 4 Jul 2023 23:21:24 +0300 Subject: Nix CI: split inputs and wlroots updating Now there are separate update scripts for wlroots and for all other inputs. --- .github/workflows/nix-update-inputs.yaml | 40 +++++++++++++++++++++++++++++++ .github/workflows/nix-update-wlroots.yaml | 35 +++++++++++++++++++++++++++ .github/workflows/nix-update.yaml | 29 ---------------------- 3 files changed, 75 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/nix-update-inputs.yaml create mode 100644 .github/workflows/nix-update-wlroots.yaml delete mode 100644 .github/workflows/nix-update.yaml (limited to '.github/workflows') diff --git a/.github/workflows/nix-update-inputs.yaml b/.github/workflows/nix-update-inputs.yaml new file mode 100644 index 00000000..3711388d --- /dev/null +++ b/.github/workflows/nix-update-inputs.yaml @@ -0,0 +1,40 @@ +name: "Nix update" + +on: + schedule: + - cron: '0 0 * * *' + +jobs: + update: + name: "inputs" + runs-on: ubuntu-latest + steps: + - name: Clone repository + uses: actions/checkout@v3 + + - name: Install nix + uses: cachix/install-nix-action@v20 + with: + install_url: https://nixos.org/nix/install + extra_nix_config: | + auto-optimise-store = true + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + experimental-features = nix-command flakes + + - name: Update lockfile + run: nix/update-nixpkgs.sh + + - uses: cachix/cachix-action@v12 + with: + name: hyprland + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + + - name: Build packages + run: nix flake check --print-build-logs --accept-flake-config + + - name: Build Waybar-Hyprland + run: nix build .#waybar-hyprland --print-build-logs + + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "Nix: bump inputs" diff --git a/.github/workflows/nix-update-wlroots.yaml b/.github/workflows/nix-update-wlroots.yaml new file mode 100644 index 00000000..25650400 --- /dev/null +++ b/.github/workflows/nix-update-wlroots.yaml @@ -0,0 +1,35 @@ +name: "Nix update" + +on: [push, workflow_dispatch] + +jobs: + update: + name: "wlroots" + runs-on: ubuntu-latest + steps: + - name: Clone repository + uses: actions/checkout@v3 + + - name: Install nix + uses: cachix/install-nix-action@v20 + with: + install_url: https://nixos.org/nix/install + extra_nix_config: | + auto-optimise-store = true + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + experimental-features = nix-command flakes + + - name: Update lockfile + run: nix/update-wlroots.sh + + - uses: cachix/cachix-action@v12 + with: + name: hyprland + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + + - name: Build packages + run: nix flake check --print-build-logs --accept-flake-config + + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "Nix: bump wlroots" diff --git a/.github/workflows/nix-update.yaml b/.github/workflows/nix-update.yaml deleted file mode 100644 index 7bd84350..00000000 --- a/.github/workflows/nix-update.yaml +++ /dev/null @@ -1,29 +0,0 @@ -name: "Nix: update lockfile" - -on: [push, workflow_dispatch] - -jobs: - update: - runs-on: ubuntu-latest - steps: - - name: Clone repository - uses: actions/checkout@v3 - - name: Install nix - uses: cachix/install-nix-action@v20 - with: - install_url: https://nixos.org/nix/install - extra_nix_config: | - auto-optimise-store = true - access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - experimental-features = nix-command flakes - - name: Update lockfile - run: nix/update-inputs.sh - - uses: cachix/cachix-action@v12 - with: - name: hyprland - authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - - name: Build Waybar-Hyprland - run: nix build .#waybar-hyprland --print-build-logs - - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: "[gha] bump flake inputs" -- cgit v1.2.3