mirror of
https://github.com/harivansh-afk/nix.git
synced 2026-04-19 19:04:48 +00:00
ci: move quality workflow to .forgejo/ so github stops queueing
Made-with: Cursor
This commit is contained in:
parent
92a3a6a4b3
commit
b31ad77afa
1 changed files with 0 additions and 0 deletions
64
.forgejo/workflows/quality.yml
Normal file
64
.forgejo/workflows/quality.yml
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
name: quality
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
runs-on: native
|
||||
outputs:
|
||||
quality: ${{ steps.filter.outputs.quality }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: filter
|
||||
with:
|
||||
filters: |
|
||||
quality:
|
||||
- "**/*.nix"
|
||||
- "flake.lock"
|
||||
- "flake.nix"
|
||||
- "justfile"
|
||||
- "ci/**"
|
||||
- "config/**"
|
||||
- "scripts/**"
|
||||
- ".github/workflows/**"
|
||||
|
||||
flake-check:
|
||||
name: Flake Check
|
||||
runs-on: native
|
||||
needs: changes
|
||||
if: ${{ needs.changes.outputs.quality == 'true' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: nix flake check
|
||||
|
||||
nix-format:
|
||||
name: Nix Format Check
|
||||
runs-on: native
|
||||
needs: changes
|
||||
if: ${{ needs.changes.outputs.quality == 'true' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: nix fmt -- --ci
|
||||
|
||||
deploy-netty:
|
||||
name: Deploy netty
|
||||
runs-on: native
|
||||
needs: [changes, flake-check, nix-format]
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.changes.outputs.quality == 'true' }}
|
||||
concurrency:
|
||||
group: deploy-netty
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Rebuild netty
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
/run/wrappers/bin/sudo /run/current-system/sw/bin/nixos-rebuild switch --flake ".#netty"
|
||||
Loading…
Add table
Add a link
Reference in a new issue