From 0298d0384592741b6b96d7ab0355bcb093d60664 Mon Sep 17 00:00:00 2001 From: Daniel Winkler Date: Fri, 30 Jan 2026 14:28:48 +1100 Subject: [PATCH] Added github actions --- .github/dependapot.yml | 7 ++++ .github/workflows/check.yml | 39 +++++++++++++++++++ .../workflows/flakehub-publish-rolling.yml | 22 +++++++++++ .github/workflows/update.yml | 32 +++++++++++++++ 4 files changed, 100 insertions(+) create mode 100644 .github/dependapot.yml create mode 100644 .github/workflows/check.yml create mode 100644 .github/workflows/flakehub-publish-rolling.yml create mode 100644 .github/workflows/update.yml diff --git a/.github/dependapot.yml b/.github/dependapot.yml new file mode 100644 index 0000000..d202a33 --- /dev/null +++ b/.github/dependapot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates to GitHub Actions every week + interval: "weekly" diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..cad89a1 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,39 @@ +name: "Test Cats" +on: + workflow_dispatch: # allows manual triggering + push: + paths: + - 'flake.lock' + - 'flake.nix' + - 'modules' + pull_request: + paths: + - 'flake.lock' + - 'flake.nix' + - 'modules' +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +jobs: + tests: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + steps: + - uses: actions/checkout@v4 + - uses: wimpysworld/nothing-but-nix@main + if: runner.os == 'Linux' + with: + hatchet-protocol: 'carve' + - uses: cachix/install-nix-action@v31 + with: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: cachix/cachix-action@v14 + with: + name: rde + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + extraPullNames: rstats-on-nix, nix-community + - run: nix build + - run: nix develop + - run: nix flake check diff --git a/.github/workflows/flakehub-publish-rolling.yml b/.github/workflows/flakehub-publish-rolling.yml new file mode 100644 index 0000000..57250d0 --- /dev/null +++ b/.github/workflows/flakehub-publish-rolling.yml @@ -0,0 +1,22 @@ +name: "Publish every Git push to main to FlakeHub" +on: + push: + branches: + - "main" +jobs: + flakehub-publish: + runs-on: "ubuntu-latest" + permissions: + id-token: "write" + contents: "read" + steps: + - uses: "actions/checkout@v5" + with: + persist-credentials: false + - uses: "DeterminateSystems/determinate-nix-action@v3" + - uses: "DeterminateSystems/flakehub-push@main" + with: + name: "dwinkler1/nixCatsConfig" + rolling: true + visibility: "public" + include-output-paths: true diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml new file mode 100644 index 0000000..46d74a3 --- /dev/null +++ b/.github/workflows/update.yml @@ -0,0 +1,32 @@ +name: update-flake-lock + +on: + workflow_dispatch: # allows manual triggering + schedule: + - cron: '0 3 * * *' + +jobs: + lockfile1: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - uses: wimpysworld/nothing-but-nix@main + with: + hatchet-protocol: 'carve' + - name: Install Determinate Nix + uses: DeterminateSystems/determinate-nix-action@v3 + - uses: cachix/cachix-action@v14 + with: + name: rde + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + extraPullNames: rstats-on-nix, nix-community + - name: Update flake.lock + uses: DeterminateSystems/update-flake-lock@v25 + with: + token: ${{ secrets.GH_TOKEN_FOR_UPDATES }} + branch: update + pr-title: "Update flake.lock" # Title of PR to be created + pr-labels: | # Labels to be set on the PR + dependencies + automated