Improve workflows
All checks were successful
Check actions / check-actions-actionlint (push) Successful in 45s
Check actions / check-actions-yamllint (push) Successful in 56s
Run nix flake check / flake-check (push) Successful in 2m5s

This commit is contained in:
Torjus Håkestad 2024-10-03 21:19:53 +02:00
parent 842adea065
commit 7450cea426
4 changed files with 47 additions and 9 deletions

33
.github/workflows/actions-check.yaml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Check actions
on:
push:
paths:
- .github/workflows/*.yaml
- .github/workflows/*.yml
pull_request:
paths:
- .github/workflows/*.yaml
- .github/workflows/*.yml
jobs:
check-actions-actionlint:
runs-on: ubuntu-latest
container:
image: ghcr.io/catthehacker/ubuntu:runner-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v5
with:
go-version: '1.23'
- run: |
go install github.com/rhysd/actionlint/cmd/actionlint@latest
actionlint .github/workflows/*.yaml
check-actions-yamllint:
runs-on: ubuntu-latest
container:
image: ghcr.io/catthehacker/ubuntu:runner-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
- run: |
pipx run yamllint .github/workflows/*.yaml

View File

@ -1,10 +1,10 @@
name: flake-check name: Run nix flake check
on: on:
push: push:
pull_request: pull_request:
jobs: jobs:
build: flake-check:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: ghcr.io/catthehacker/ubuntu:runner-latest image: ghcr.io/catthehacker/ubuntu:runner-latest

View File

@ -1,11 +1,11 @@
---
name: Periodic flake update name: Periodic flake update
on: on: # yamllint disable-line rule:truthy
schedule: schedule:
- cron: '0 */2 * * *' - cron: "0 */2 * * *"
workflow_dispatch:
permissions: permissions:
contents: write contents: write
jobs: jobs:
flake-update: flake-update:
@ -23,4 +23,3 @@ jobs:
run: nix flake update --commit-lock-file run: nix flake update --commit-lock-file
- name: push - name: push
run: git push run: git push

View File

@ -132,7 +132,13 @@
devShells = forAllSystems ( devShells = forAllSystems (
{ pkgs }: { pkgs }:
{ {
default = pkgs.mkShell { packages = with pkgs; [ pre-commit ]; }; default = pkgs.mkShell {
packages = with pkgs; [
act
actionlint
yamllint
];
};
} }
); );
}; };