-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7359062
commit 4158a73
Showing
2 changed files
with
51 additions
and
0 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,14 @@ | ||
name: Lint | ||
|
||
on: | ||
# Run this workflow when PRs target `main` and when they're merged in `main`: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
lint: | ||
uses: ./.github/workflows/reusable-lint.yml | ||
secrets: inherit | ||
with: | ||
runner: '["self-hosted", "Linux", "x86-64-v2"]' |
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 @@ | ||
name: 'Lint' | ||
|
||
on: | ||
# Allow this workflow to be reused by other workflows: | ||
workflow_call: | ||
inputs: | ||
runner: | ||
description: 'JSON-encoded list of runner labels' | ||
default: '["self-hosted"]' | ||
required: false | ||
type: string | ||
|
||
secrets: | ||
NIX_GITHUB_TOKEN: | ||
description: GitHub token to add as access-token in nix.conf | ||
required: false | ||
CACHIX_AUTH_TOKEN: | ||
description: 'Cachix auth token' | ||
required: true | ||
|
||
jobs: | ||
lint: | ||
runs-on: self-hosted | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Nix | ||
uses: metacraft-labs/nixos-modules/.github/install-nix@main | ||
with: | ||
nix-github-token: ${{ secrets.NIX_GITHUB_TOKEN }} | ||
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} | ||
cachix-cache: ${{ vars.CACHIX_CACHE }} | ||
trusted-public-keys: ${{ vars.TRUSTED_PUBLIC_KEYS }} | ||
substituters: ${{ vars.SUBSTITUTERS }} | ||
|
||
- name: Check formatting | ||
run: nix develop --accept-flake-config .#pre-commit -c pre-commit run --all --show-diff-on-failure --color=always |