Skip to content

Commit

Permalink
workflows/nixpkgs-review: init
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfgangwalther committed Jan 12, 2025
1 parent 549d2f5 commit 94c6483
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/nixpkgs-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# This workflow allows a contributor to run nixpkgs-review in their own fork, using
# their own allocated Github Actions runners.
# To get started, make sure that the master branch of your fork contains this workflow.
# Then:
# - Go to Actions -> A run of nixpkgs-review
# - Click "Run workflow"
# - Enter the upstream pull request number
# - Click "Run workflow"

# Note, this begins with "A" on purpose, to make it appear at the top of the list
# of workflows for convenience.
name: "A run of nixpkgs-review"

on:
workflow_dispatch:
inputs:
pr:
description: Nixpkgs PR Number
required: true

run-name: "nixpkgs-review for #${{ inputs.pr }}"

permissions: {}

jobs:
nixpkgs-review:
strategy:
fail-fast: false
matrix:
include:
- runner: macos-14
system: aarch64-darwin
- runner: macos-13
system: x86_64-darwin
# TODO: Add aarch64-linux once https://github.com/github/roadmap/issues/970 is available.
- runner: ubuntu-24.04
system: x86_64-linux

name: "#${{ inputs.pr }} @ ${{ matrix.system }}"
runs-on: ${{ matrix.runner }}
env:
PR_NUMBER: ${{ inputs.pr }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30

- name: Collect debug info
run: |
echo Running nixpkgs-review version:
# Using nixpkgs channel instead of local checkout to avoid having to keep
# a the fork's master branch up to date.
nix run 'nixpkgs#nixpkgs-review' -- --version
- name: Run nixpkgs-review
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir report
nix run 'nixpkgs#nixpkgs-review' -- \
pr --print-result \
--run 'mv logs report.json report.md "${{ github.workspace }}"/report' \
--systems current \
"$PR_NUMBER"
- name: Upload report
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: report-${{ matrix.system }}
path: report

0 comments on commit 94c6483

Please sign in to comment.