fix CI runs
This commit is contained in:
@@ -13,26 +13,21 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
dix:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: nix
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
extra_nix_config: |
|
||||
experimental-features = nix-command flakes
|
||||
|
||||
- name: worktree base for diff
|
||||
run: git worktree add "$RUNNER_TEMP/base" "${{ github.event.pull_request.base.sha }}"
|
||||
|
||||
- name: build closures and render diff
|
||||
run: |
|
||||
nix run .#ci -- diff "$RUNNER_TEMP/base" . \
|
||||
nix run -L .#ci -- diff "$RUNNER_TEMP/base" . \
|
||||
"### System closure diff vs \`${{ github.event.pull_request.base.ref }}\`" \
|
||||
> "$RUNNER_TEMP/comment.md"
|
||||
nix run .#ci -- inspect-diff "$RUNNER_TEMP/base" . \
|
||||
nix run -L .#ci -- inspect-diff "$RUNNER_TEMP/base" . \
|
||||
"### Inspection diff vs \`${{ github.event.pull_request.base.ref }}\`" \
|
||||
>> "$RUNNER_TEMP/comment.md"
|
||||
|
||||
@@ -42,4 +37,4 @@ jobs:
|
||||
API: ${{ github.api_url }}
|
||||
REPO: ${{ github.repository }}
|
||||
PR: ${{ github.event.pull_request.number }}
|
||||
run: nix run .#ci -- post-comment "<!-- dix-diff -->" "$RUNNER_TEMP/comment.md"
|
||||
run: nix run -L .#ci -- post-comment "<!-- dix-diff -->" "$RUNNER_TEMP/comment.md"
|
||||
|
||||
@@ -9,17 +9,12 @@ permissions:
|
||||
|
||||
jobs:
|
||||
dix:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: nix
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
extra_nix_config: |
|
||||
experimental-features = nix-command flakes
|
||||
|
||||
- name: diff latest tag against HEAD
|
||||
run: |
|
||||
tag=$(git tag --sort=-creatordate | head -n1)
|
||||
@@ -30,8 +25,8 @@ jobs:
|
||||
git worktree add "$RUNNER_TEMP/old" "$tag"
|
||||
head=$(git rev-parse --short HEAD)
|
||||
{
|
||||
nix run .#ci -- diff "$RUNNER_TEMP/old" . \
|
||||
nix run -L .#ci -- diff "$RUNNER_TEMP/old" . \
|
||||
"# System closure diff: \`$tag\` -> \`$head\`"
|
||||
nix run .#ci -- inspect-diff "$RUNNER_TEMP/old" . \
|
||||
nix run -L .#ci -- inspect-diff "$RUNNER_TEMP/old" . \
|
||||
"# Inspection diff: \`$tag\` -> \`$head\`"
|
||||
} | tee -a "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
@@ -14,13 +14,8 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
flake-check:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: nix
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
extra_nix_config: |
|
||||
experimental-features = nix-command flakes
|
||||
|
||||
- run: nix flake check -L
|
||||
|
||||
@@ -11,16 +11,11 @@ permissions:
|
||||
|
||||
jobs:
|
||||
update:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: nix
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
extra_nix_config: |
|
||||
experimental-features = nix-command flakes
|
||||
|
||||
- run: nix flake update
|
||||
- run: nix flake update -L
|
||||
|
||||
- name: open/update PR
|
||||
env:
|
||||
@@ -29,5 +24,5 @@ jobs:
|
||||
REPO: ${{ github.repository }}
|
||||
run: |
|
||||
printf 'Automated `nix flake update`.\n' > "$RUNNER_TEMP/body.md"
|
||||
nix run .#ci -- open-pr \
|
||||
nix run -L .#ci -- open-pr \
|
||||
flake-update "$GITHUB_REF_NAME" "flake.lock: update inputs" "$RUNNER_TEMP/body.md" automated
|
||||
|
||||
+11
-17
@@ -15,27 +15,21 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: nix
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
extra_nix_config: |
|
||||
experimental-features = nix-command flakes
|
||||
|
||||
- name: pick reporter
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" = pull_request ]; then
|
||||
echo "REPORTER=github-pr-review" >> "$GITHUB_ENV"
|
||||
else
|
||||
echo "REPORTER=local" >> "$GITHUB_ENV"
|
||||
fi
|
||||
|
||||
- name: run linters
|
||||
run: nix run .#ci -- lint . "$RUNNER_TEMP/findings"
|
||||
run: nix run -L .#ci -- lint . "$RUNNER_TEMP/findings"
|
||||
|
||||
- name: report findings
|
||||
if: always()
|
||||
env:
|
||||
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: nix run .#ci -- lint-report "$REPORTER" "$RUNNER_TEMP/findings"
|
||||
REVIEWDOG_GITEA_API_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" = pull_request ]; then
|
||||
nix run -L .#ci -- lint-report gitea-pr-review "$RUNNER_TEMP/findings"
|
||||
else
|
||||
nix run -L .#ci -- lint-summary "$RUNNER_TEMP/findings" \
|
||||
| tee -a "$GITHUB_STEP_SUMMARY"
|
||||
fi
|
||||
|
||||
@@ -11,18 +11,13 @@ permissions:
|
||||
|
||||
jobs:
|
||||
scan:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: nix
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
extra_nix_config: |
|
||||
experimental-features = nix-command flakes
|
||||
|
||||
- name: scan host closures
|
||||
id: scan
|
||||
run: echo "count=$(nix run .#ci -- vulnix . "$RUNNER_TEMP/issue.md")" >> "$GITHUB_OUTPUT"
|
||||
run: echo "count=$(nix run -L .#ci -- vulnix . "$RUNNER_TEMP/issue.md")" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: file/update issue
|
||||
if: steps.scan.outputs.count != '0'
|
||||
@@ -30,7 +25,7 @@ jobs:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
API: ${{ github.api_url }}
|
||||
REPO: ${{ github.repository }}
|
||||
run: nix run .#ci -- upsert-issue vulnix "vulnix: known vulnerabilities in system closure" "$RUNNER_TEMP/issue.md"
|
||||
run: nix run -L .#ci -- upsert-issue vulnix "vulnix: known vulnerabilities in system closure" "$RUNNER_TEMP/issue.md"
|
||||
|
||||
- name: close resolved issue
|
||||
if: steps.scan.outputs.count == '0'
|
||||
@@ -38,4 +33,4 @@ jobs:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
API: ${{ github.api_url }}
|
||||
REPO: ${{ github.repository }}
|
||||
run: nix run .#ci -- close-issue vulnix
|
||||
run: nix run -L .#ci -- close-issue vulnix
|
||||
|
||||
Reference in New Issue
Block a user