By using the pinned nixpkgs we have for CI, we can lift the restriction of building the nixpkgs manual only in PRs targeting master. At the same time, this uses the pinned nixpkgs for the doc/ folder's dev shell. This allows entering that shell while working on a staging-based branch and write documentation. Why should staging be un(der)documented, after all? Note: The package that is available in nixpkgs as pkgs.nixpkgs-manual will still be built with the current nixpkgs checkout, not the pinned version. This is the same that hydra builds.
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
name: "Build Nixpkgs manual v2"
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- .github/workflows/manual-nixpkgs-v2.yml
|
|
pull_request_target:
|
|
paths:
|
|
- 'doc/**'
|
|
- 'lib/**'
|
|
- 'pkgs/by-name/ni/nixdoc/**'
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
nixpkgs:
|
|
name: nixpkgs-manual-build
|
|
runs-on: ubuntu-24.04-arm
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
sparse-checkout: .github/actions
|
|
- name: Check if the PR can be merged and checkout the merge commit
|
|
uses: ./.github/actions/get-merge-commit
|
|
with:
|
|
merged-as-untrusted: true
|
|
|
|
- uses: cachix/install-nix-action@526118121621777ccd86f79b04685a9319637641 # v31
|
|
with:
|
|
extra_nix_config: sandbox = true
|
|
|
|
- uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
|
|
with:
|
|
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
|
|
name: nixpkgs-ci
|
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
|
|
|
- name: Building Nixpkgs manual
|
|
run: nix-build untrusted/ci -A manual-nixpkgs -A manual-nixpkgs-tests
|