CI: make check/cachix callable with ref input
...so that a reworked "ci" workflow run from a schedule can use them to check a staging branch rather than "main".
This commit is contained in:
parent
816827ffed
commit
40a3228e64
2 changed files with 16 additions and 0 deletions
8
.github/workflows/cachix.yml
vendored
8
.github/workflows/cachix.yml
vendored
|
|
@ -19,6 +19,12 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- 'main'
|
- 'main'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
ref:
|
||||||
|
description: 'Ref/branch to check'
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
@ -26,6 +32,8 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ inputs.ref }}
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: cachix/install-nix-action@v27
|
uses: cachix/install-nix-action@v27
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
8
.github/workflows/check.yml
vendored
8
.github/workflows/check.yml
vendored
|
|
@ -18,6 +18,12 @@ on:
|
||||||
push:
|
push:
|
||||||
pull_request:
|
pull_request:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
ref:
|
||||||
|
description: 'Ref/branch to check'
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
|
|
@ -25,6 +31,8 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ inputs.ref }}
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: DeterminateSystems/nix-installer-action@main
|
uses: DeterminateSystems/nix-installer-action@main
|
||||||
- name: Enable Magic Nix Cache
|
- name: Enable Magic Nix Cache
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue