Feature/actions (#114)
* Add some basic actions/repo settings Signed-off-by: ahuston-0 <aliceghuston@gmail.com> * Add issues/milestones to .github.yml Signed-off-by: ahuston-0 <aliceghuston@gmail.com> * Finalize settings Signed-off-by: ahuston-0 <aliceghuston@gmail.com> * Add checks Signed-off-by: ahuston-0 <aliceghuston@gmail.com> * lock action update Signed-off-by: ahuston-0 <aliceghuston@gmail.com> * checkout for lock check Signed-off-by: ahuston-0 <aliceghuston@gmail.com> * make lock fail on check Signed-off-by: ahuston-0 <aliceghuston@gmail.com> * fix flake update action Signed-off-by: ahuston-0 <aliceghuston@gmail.com> * Update contrib Signed-off-by: ahuston-0 <aliceghuston@gmail.com> * add formatting check Signed-off-by: ahuston-0 <aliceghuston@gmail.com> * add nixfmt-rfc-style Signed-off-by: ahuston-0 <aliceghuston@gmail.com> * update lock Signed-off-by: ahuston-0 <aliceghuston@gmail.com> * initial format Signed-off-by: ahuston-0 <aliceghuston@gmail.com> * minor change to trigger actions builds This should be reverted before merging the PR Signed-off-by: ahuston-0 <aliceghuston@gmail.com> * fix format hook Signed-off-by: ahuston-0 <aliceghuston@gmail.com> * flakes update on PR now :) Signed-off-by: ahuston-0 <aliceghuston@gmail.com> * create PR for update Signed-off-by: ahuston-0 <aliceghuston@gmail.com> * allow PR on actions branch Signed-off-by: ahuston-0 <aliceghuston@gmail.com> * PR Signed-off-by: ahuston-0 <aliceghuston@gmail.com> * restore flake update to normal Signed-off-by: ahuston-0 <aliceghuston@gmail.com> * revert flake-update-service changes Signed-off-by: ahuston-0 <aliceghuston@gmail.com> --------- Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
22
.github/workflows/flake-health-checks.yml
vendored
Normal file
22
.github/workflows/flake-health-checks.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
name: "Check Nix flake"
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
paths:
|
||||
- '**.nix'
|
||||
pull_request:
|
||||
branches: ["main"]
|
||||
paths:
|
||||
- '**.nix'
|
||||
jobs:
|
||||
health-check:
|
||||
name: "Perform Nix flake checks"
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macOS-latest]
|
||||
steps:
|
||||
- uses: DeterminateSystems/nix-installer-action@main
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- uses: actions/checkout@v4
|
||||
- run: nix flake check
|
25
.github/workflows/flake-update.yml
vendored
Normal file
25
.github/workflows/flake-update.yml
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
name: "Update flakes"
|
||||
on:
|
||||
repository_dispatch:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "51 2 * * 1,4"
|
||||
jobs:
|
||||
createPullRequest:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/main' # ensure workflow_dispatch only runs on main
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v24
|
||||
with:
|
||||
extra_nix_config: |
|
||||
experimental-features = nix-command flakes
|
||||
- name: Update flake.lock
|
||||
id: update
|
||||
uses: DeterminateSystems/update-flake-lock@main
|
||||
with:
|
||||
pr-title: "Update flake.lock" # Title of PR to be created
|
||||
pr-labels: | # Labels to be set on the PR
|
||||
dependencies
|
||||
automated
|
19
.github/workflows/lock-health-checks.yml
vendored
Normal file
19
.github/workflows/lock-health-checks.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
name: "Check flake.lock"
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
paths:
|
||||
- '**.nix'
|
||||
pull_request:
|
||||
branches: ["main"]
|
||||
paths:
|
||||
- '**.nix'
|
||||
jobs:
|
||||
health-check:
|
||||
name: "Check health of `flake.lock`"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: DeterminateSystems/flake-checker-action@main
|
||||
with:
|
||||
fail-mode: true
|
19
.github/workflows/nix-fmt.yml
vendored
Normal file
19
.github/workflows/nix-fmt.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
name: "Check Nix formatting"
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
paths:
|
||||
- '**.nix'
|
||||
pull_request:
|
||||
branches: ["main"]
|
||||
paths:
|
||||
- '**.nix'
|
||||
jobs:
|
||||
health-check:
|
||||
name: "Perform Nix format checks"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: DeterminateSystems/nix-installer-action@main
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- uses: actions/checkout@v4
|
||||
- run: nix fmt -- --check .
|
Reference in New Issue
Block a user