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:
Marien Zwart 2024-06-22 20:30:47 +10:00
parent 816827ffed
commit 40a3228e64
No known key found for this signature in database
2 changed files with 16 additions and 0 deletions

View file

@ -19,6 +19,12 @@ on:
branches:
- 'main'
workflow_dispatch:
workflow_call:
inputs:
ref:
description: 'Ref/branch to check'
required: false
type: string
jobs:
build:
@ -26,6 +32,8 @@ jobs:
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- name: Install Nix
uses: cachix/install-nix-action@v27
with:

View file

@ -18,6 +18,12 @@ on:
push:
pull_request:
workflow_dispatch:
workflow_call:
inputs:
ref:
description: 'Ref/branch to check'
required: false
type: string
jobs:
check:
@ -25,6 +31,8 @@ jobs:
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Enable Magic Nix Cache