Added github actions

This commit is contained in:
Daniel Winkler 2026-01-30 14:28:48 +11:00
commit 0298d03845
4 changed files with 100 additions and 0 deletions

7
.github/dependapot.yml vendored Normal file
View file

@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"

39
.github/workflows/check.yml vendored Normal file
View file

@ -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

View file

@ -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

32
.github/workflows/update.yml vendored Normal file
View file

@ -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