mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 19:55:41 +03:00
workflows: make checks work with non-NixOS repos
No need for that limitation, which only artifically limits test-ability of CI in forks. Some other workflows like backports, cherry-pick checks and periodic merges are very specific to the release branches and don't need to be run in forks.
This commit is contained in:
parent
94c4c7bd3b
commit
b64d5e1c0c
5 changed files with 6 additions and 7 deletions
|
@ -12,7 +12,6 @@ jobs:
|
|||
nixos:
|
||||
name: maintainer-list-check
|
||||
runs-on: ubuntu-24.04
|
||||
if: github.repository_owner == 'NixOS'
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
|
|
4
.github/workflows/editorconfig-v2.yml
vendored
4
.github/workflows/editorconfig-v2.yml
vendored
|
@ -18,14 +18,14 @@ jobs:
|
|||
name: editorconfig-check
|
||||
runs-on: ubuntu-24.04
|
||||
needs: get-merge-commit
|
||||
if: "needs.get-merge-commit.outputs.mergedSha && github.repository_owner == 'NixOS' && !contains(github.event.pull_request.title, '[skip treewide]')"
|
||||
if: "needs.get-merge-commit.outputs.mergedSha && !contains(github.event.pull_request.title, '[skip treewide]')"
|
||||
steps:
|
||||
- name: Get list of changed files from PR
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh api \
|
||||
repos/NixOS/nixpkgs/pulls/${{github.event.number}}/files --paginate \
|
||||
repos/${{ github.repository }}/pulls/${{ github.event.number }}/files --paginate \
|
||||
| jq '.[] | select(.status != "removed") | .filename' \
|
||||
> "$HOME/changed_files"
|
||||
|
||||
|
|
2
.github/workflows/manual-nixos-v2.yml
vendored
2
.github/workflows/manual-nixos-v2.yml
vendored
|
@ -14,7 +14,6 @@ jobs:
|
|||
nixos:
|
||||
name: nixos-manual-build
|
||||
runs-on: ubuntu-24.04
|
||||
if: github.repository_owner == 'NixOS'
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
|
@ -27,6 +26,7 @@ jobs:
|
|||
extra_nix_config: sandbox = true
|
||||
|
||||
- uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15
|
||||
if: github.repository_owner == 'NixOS'
|
||||
with:
|
||||
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
|
||||
name: nixpkgs-ci
|
||||
|
|
2
.github/workflows/manual-nixpkgs-v2.yml
vendored
2
.github/workflows/manual-nixpkgs-v2.yml
vendored
|
@ -16,7 +16,6 @@ jobs:
|
|||
nixpkgs:
|
||||
name: nixpkgs-manual-build
|
||||
runs-on: ubuntu-24.04
|
||||
if: github.repository_owner == 'NixOS'
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
|
@ -29,6 +28,7 @@ jobs:
|
|||
extra_nix_config: sandbox = true
|
||||
|
||||
- uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15
|
||||
if: github.repository_owner == 'NixOS'
|
||||
with:
|
||||
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
|
||||
name: nixpkgs-ci
|
||||
|
|
4
.github/workflows/nix-parse-v2.yml
vendored
4
.github/workflows/nix-parse-v2.yml
vendored
|
@ -18,14 +18,14 @@ jobs:
|
|||
name: nix-files-parseable-check
|
||||
runs-on: ubuntu-24.04
|
||||
needs: get-merge-commit
|
||||
if: "needs.get-merge-commit.outputs.mergedSha && github.repository_owner == 'NixOS' && !contains(github.event.pull_request.title, '[skip treewide]')"
|
||||
if: "needs.get-merge-commit.outputs.mergedSha && !contains(github.event.pull_request.title, '[skip treewide]')"
|
||||
steps:
|
||||
- name: Get list of changed files from PR
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh api \
|
||||
repos/NixOS/nixpkgs/pulls/${{github.event.number}}/files --paginate \
|
||||
repos/${{ github.repository }}/pulls/${{github.event.number}}/files --paginate \
|
||||
| jq --raw-output '.[] | select(.status != "removed" and (.filename | endswith(".nix"))) | .filename' \
|
||||
> "$HOME/changed_files"
|
||||
if [[ -s "$HOME/changed_files" ]]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue