mirror of
https://github.com/harivansh-afk/nix.git
synced 2026-04-19 12:04:11 +00:00
- switch all jobs to runs-on: native so the netty forgejo runner picks them up - deploy-netty now runs locally on netty via `just switch-netty` (no SSH) - fix tmpfiles owner: gitea-actions-runner creates user `gitea-runner`, not `forgejo-runner` Made-with: Cursor
74 lines
2 KiB
YAML
74 lines
2 KiB
YAML
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
|
|
- name: Prepare local flake input shims
|
|
run: |
|
|
set -euo pipefail
|
|
sudo mkdir -p /Users/rathi/Documents/GitHub/companion/agentcomputer/apps
|
|
sudo ln -sfn "$GITHUB_WORKSPACE/ci/agentcomputer-cli-stub" /Users/rathi/Documents/GitHub/companion/agentcomputer/apps/cli
|
|
- 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
|
|
- name: Prepare local flake input shims
|
|
run: |
|
|
set -euo pipefail
|
|
sudo mkdir -p /Users/rathi/Documents/GitHub/companion/agentcomputer/apps
|
|
sudo ln -sfn "$GITHUB_WORKSPACE/ci/agentcomputer-cli-stub" /Users/rathi/Documents/GitHub/companion/agentcomputer/apps/cli
|
|
- 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: Deploy netty
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
just switch-netty
|