From 40a3228e647e730f15c3d920e8d6e5e8fb3981a4 Mon Sep 17 00:00:00 2001 From: Marien Zwart Date: Sat, 22 Jun 2024 20:30:47 +1000 Subject: [PATCH] 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". --- .github/workflows/cachix.yml | 8 ++++++++ .github/workflows/check.yml | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/.github/workflows/cachix.yml b/.github/workflows/cachix.yml index 51f5e0b..ad3ba52 100644 --- a/.github/workflows/cachix.yml +++ b/.github/workflows/cachix.yml @@ -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: diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index c40d799..4d2e7c2 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -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