From f14cb7635aa1e2695e895d98a8d81f02d3ce24f6 Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Fri, 29 Dec 2023 00:00:11 +0200 Subject: [PATCH] CI: init --- .github/workflows/nix-build.yml | 21 +++++++++++++++++++ .github/workflows/nix-ci.yml | 7 +++++++ .github/workflows/nix-update-inputs.yml | 28 +++++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 .github/workflows/nix-build.yml create mode 100644 .github/workflows/nix-ci.yml create mode 100644 .github/workflows/nix-update-inputs.yml diff --git a/.github/workflows/nix-build.yml b/.github/workflows/nix-build.yml new file mode 100644 index 0000000..9d11a95 --- /dev/null +++ b/.github/workflows/nix-build.yml @@ -0,0 +1,21 @@ +on: + workflow_call: + +jobs: + build: + strategy: + matrix: + package: + - borders-plus-plus + - csgo-vulkan-fix + - hyprbars + - hyprtrails + - hyprwinwrap + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + + - run: nix build .#${{ matrix.package }} -L diff --git a/.github/workflows/nix-ci.yml b/.github/workflows/nix-ci.yml new file mode 100644 index 0000000..e5eb2cf --- /dev/null +++ b/.github/workflows/nix-ci.yml @@ -0,0 +1,7 @@ +name: Nix + +on: [push, pull_request, workflow_dispatch] + +jobs: + build: + uses: ./.github/workflows/nix-build.yml diff --git a/.github/workflows/nix-update-inputs.yml b/.github/workflows/nix-update-inputs.yml new file mode 100644 index 0000000..eb916c9 --- /dev/null +++ b/.github/workflows/nix-update-inputs.yml @@ -0,0 +1,28 @@ +name: Nix + +on: + schedule: + - cron: '0 0 * * *' # check daily + +jobs: + update: + name: inputs + runs-on: ubuntu-latest + steps: + - name: Clone repository + uses: actions/checkout@v3 + with: + token: ${{ secrets.PAT }} + + - uses: DeterminateSystems/nix-installer-action@main + - name: Update inputs + run: nix flake update + + - name: Commit + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "[gha] Nix: update inputs" + + update-build: + needs: update + uses: ./.github/workflows/nix-build.yml