Skip to content

Commit

Permalink
actions/nixpkgs-review: agora vai
Browse files Browse the repository at this point in the history
Signed-off-by: lucasew <lucas59356@gmail.com>
  • Loading branch information
lucasew committed Dec 18, 2024
1 parent 71b4ac9 commit c8cbc09
Showing 1 changed file with 33 additions and 25 deletions.
58 changes: 33 additions & 25 deletions .github/workflows/nixpkgs-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ concurrency:

jobs:
build-x86_64-linux:
name: 'nixpkgs-review #${{ github.event.inputs.pr }} on x86_64-linux'
name: '#${{ github.event.inputs.pr }} on x86_64-linux'
if: ${{ github.event.inputs.x86_64-linux == 'true' }}
runs-on: ubuntu-latest

Expand All @@ -57,15 +57,16 @@ jobs:
run: |
sudo mkdir -p /nix/build
df -h
- uses: actions/cache@v4
- name: Try to fetch nixpkgs clone from cache
id: git-nixpkgs
uses: actions/cache@v4
with:
path: nixpkgs
key: git-folder
- uses: actions/checkout@v4
with:
path: nixpkgs
ref: ${{ github.event.inputs.branch }}
fetch-depth: 0
path: |
nixpkgs
key: git-nixpkgs
- name: Fetch nixpkgs from git if not
if: steps.git-nixpkgs.outputs.cache-hit != 'true'
run: git clone https://github.com/NixOS/nixpkgs nixpkgs
- uses: DeterminateSystems/nix-installer-action@v16
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -74,7 +75,7 @@ jobs:
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Run review
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_NIXPKGS_REVIEW }}
PR: ${{ github.event.inputs.pr }}
EXTRA_ARGS: ${{ github.event.inputs.extra-args }}
run: |
Expand All @@ -90,27 +91,28 @@ jobs:
include-hidden-files: true

build-aarch64-darwin:
name: 'nixpkgs-review #${{ github.event.inputs.pr }} on aarch64-darwin'
name: '#${{ github.event.inputs.pr }} on aarch64-darwin'
if: ${{ github.event.inputs.aarch64-darwin == 'true' }}
runs-on: macos-latest

steps:
- uses: actions/cache@v4
- name: Try to fetch nixpkgs clone from cache
id: git-nixpkgs
uses: actions/cache@v4
with:
path: nixpkgs
key: git-folder
- uses: actions/checkout@v4
with:
path: nixpkgs
ref: ${{ github.event.inputs.branch }}
fetch-depth: 0
path: |
nixpkgs
key: git-nixpkgs
- name: Fetch nixpkgs from git if not
if: steps.git-nixpkgs.outputs.cache-hit != 'true'
run: git clone https://github.com/NixOS/nixpkgs nixpkgs
- uses: DeterminateSystems/nix-installer-action@v16
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Run review
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_NIXPKGS_REVIEW }}
PR: ${{ github.event.inputs.pr }}
EXTRA_ARGS: ${{ github.event.inputs.extra-args }}
run: |
Expand All @@ -126,15 +128,21 @@ jobs:
include-hidden-files: true

build-x86_64-darwin:
name: 'nixpkgs-review #${{ github.event.inputs.pr }} on x86_64-darwin'
name: '#${{ github.event.inputs.pr }} on x86_64-darwin'
if: ${{ github.event.inputs.x86_64-darwin == 'true' }}
runs-on: macos-13

steps:
- uses: actions/cache@v4
- name: Try to fetch nixpkgs clone from cache
id: git-nixpkgs
uses: actions/cache@v4
with:
path: nixpkgs
key: git-folder
path: |
nixpkgs
key: git-nixpkgs
- name: Fetch nixpkgs from git if not
if: steps.git-nixpkgs.outputs.cache-hit != 'true'
run: git clone https://github.com/NixOS/nixpkgs nixpkgs
- uses: actions/checkout@v4
with:
path: nixpkgs
Expand All @@ -146,7 +154,7 @@ jobs:
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Run review
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_NIXPKGS_REVIEW }}
PR: ${{ github.event.inputs.pr }}
EXTRA_ARGS: ${{ github.event.inputs.extra-args }}
run: |
Expand Down

0 comments on commit c8cbc09

Please sign in to comment.