-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from jwillikers/nix
Use Nix, add more CI, and auto-update
- Loading branch information
Showing
60 changed files
with
1,386 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
BUNDLE_FORCE_RUBY_PLATFORM: "true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
if ! has nix_direnv_version || ! nix_direnv_version 3.0.6; then | ||
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.6/direnvrc" "sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM=" | ||
fi | ||
|
||
use flake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Build Jekyll site | ||
|
||
"on": | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- .github/workflows/build.yaml | ||
- default.nix | ||
- flake.lock | ||
- flake.nix | ||
- Gemfile | ||
- Gemfile.lock | ||
- gemset.nix | ||
- .bundle/config | ||
- .ruby-version | ||
- _data/ | ||
- _drafts/ | ||
- _includes/ | ||
- _pages/ | ||
- _posts/ | ||
- _config.yml | ||
- index.adoc | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: DeterminateSystems/nix-installer-action@v14 | ||
- uses: DeterminateSystems/magic-nix-cache-action@v8 | ||
# todo Cache bundler stuff? | ||
- name: Build with Jekyll | ||
run: nix build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Bundler Update | ||
|
||
"on": | ||
schedule: | ||
# Once a month on the 22nd | ||
- cron: "0 0 22 * *" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
bundler-update: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: DeterminateSystems/nix-installer-action@v14 | ||
- uses: DeterminateSystems/magic-nix-cache-action@v8 | ||
- name: Update Gem lock file | ||
run: nix develop --command bundle update | ||
- name: Update the hashes in the gemset.nix file | ||
run: nix develop --command bundix | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v7 | ||
with: | ||
assignees: ${{ github.repository_owner }} | ||
branch: "update/bundler" | ||
commit-message: "chore(deps): Update Gem lock file" | ||
title: "chore(deps): Update Gem lock file" | ||
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Check Nix Flake | ||
"on": | ||
pull_request: | ||
branches: ["main"] | ||
paths: | ||
- .github/workflows/flake-checker.yaml | ||
- flake.lock | ||
|
||
jobs: | ||
flake-checker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: DeterminateSystems/flake-checker-action@v9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Flake ❄️ Lock 🔒️ Updater ✨ | ||
|
||
"on": | ||
schedule: | ||
# Pi o'clock | ||
- cron: '3 14 * * 1,5' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
flake-lock-updater: | ||
name: Flake Lock Updater | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: DeterminateSystems/nix-installer-action@v14 | ||
- uses: DeterminateSystems/magic-nix-cache-action@v8 | ||
- uses: DeterminateSystems/update-flake-lock@v24 | ||
with: | ||
pr-assignees: ${{ github.repository_owner }} | ||
pr-labels: | | ||
automated | ||
dependencies | ||
pr-title: "chore: update flake.lock" | ||
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Format justfiles | ||
"on": | ||
pull_request: | ||
branches: ["main"] | ||
paths: | ||
- .github/workflows/format-just.yaml | ||
- flake.lock | ||
- '**/.justfile' | ||
- '**/justfile' | ||
- '**/*.just' | ||
|
||
jobs: | ||
format-just: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: DeterminateSystems/nix-installer-action@v14 | ||
- uses: DeterminateSystems/magic-nix-cache-action@v8 | ||
- name: Format justfile | ||
run: nix develop --command just --check --fmt --unstable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Pre-commit auto-update | ||
|
||
"on": | ||
schedule: | ||
# Once a month on the 2nd | ||
- cron: "0 0 2 * *" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
pre-commit-autoupdate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: DeterminateSystems/nix-installer-action@v14 | ||
- uses: DeterminateSystems/magic-nix-cache-action@v8 | ||
- name: Update pre-commit hooks | ||
run: nix develop --command pre-commit autoupdate | ||
- name: Run pre-commit hooks | ||
run: nix develop --command pre-commit run --all-files | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v7 | ||
with: | ||
assignees: ${{ github.repository_owner }} | ||
branch: "update/pre-commit-hooks" | ||
commit-message: "chore(deps): Update pre-commit hooks" | ||
title: "chore(deps): Update pre-commit hooks" | ||
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Test Nushell | ||
"on": | ||
pull_request: | ||
branches: ["main"] | ||
paths: | ||
- .github/workflows/test-nushell.yaml | ||
- flake.lock | ||
- '**/*.nu' | ||
|
||
jobs: | ||
test-nushell: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: DeterminateSystems/nix-installer-action@v14 | ||
- uses: DeterminateSystems/magic-nix-cache-action@v8 | ||
- name: Run the Nushell tests | ||
run: nix develop --command nu update-nixos-release-tests.nu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Update NixOS Release | ||
|
||
"on": | ||
schedule: | ||
- cron: "0 0 15 5,11 *" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
update-nixos-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: DeterminateSystems/nix-installer-action@v14 | ||
- uses: DeterminateSystems/magic-nix-cache-action@v8 | ||
- name: Update the NixOS release in flake.nix to the latest | ||
run: nix develop --command nu update-nixos-release.nu | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v7 | ||
with: | ||
assignees: ${{ github.repository_owner }} | ||
branch: "update/nixos" | ||
commit-message: "chore(deps): Update NixOS release" | ||
title: "chore(deps): Update NixOS release" | ||
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: yamllint | ||
"on": | ||
pull_request: | ||
branches: ["main"] | ||
paths: | ||
- .github/workflows/yamllint.yaml | ||
- .yamllint.yaml | ||
- flake.lock | ||
- '**.yaml' | ||
- '**.yml' | ||
|
||
jobs: | ||
yamllint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: DeterminateSystems/nix-installer-action@v14 | ||
- uses: DeterminateSystems/magic-nix-cache-action@v8 | ||
- name: Check YAML files | ||
run: nix develop --command yamllint --format github . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
default: serve | ||
|
||
alias f := format | ||
alias fmt := format | ||
|
||
format: | ||
just --fmt --unstable | ||
|
||
alias l := lint | ||
|
||
lint: | ||
yamllint . | ||
|
||
alias b := build | ||
|
||
build: | ||
jekyll build | ||
|
||
alias s := serve | ||
|
||
serve: | ||
jekyll serve --open-url | ||
|
||
alias t := test | ||
|
||
test: | ||
nu update-nixos-release-tests.nu | ||
|
||
alias u := update | ||
alias up := update | ||
|
||
update: && build test | ||
nu update-nixos-release.nu | ||
nix flake update | ||
bundle update | ||
bundix | ||
pre-commit autoupdate |
Oops, something went wrong.