From 1e696052f54bf261a325675c7334141c3c9de14c Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Wed, 26 Jan 2022 21:59:31 -0500 Subject: [PATCH] ci: update workflows [skip ci] --- .github/scripts/presets_examples.mjs | 2 +- .github/workflows/test.presets.yml | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/scripts/presets_examples.mjs b/.github/scripts/presets_examples.mjs index 54872cdf..614cfe9b 100644 --- a/.github/scripts/presets_examples.mjs +++ b/.github/scripts/presets_examples.mjs @@ -15,7 +15,7 @@ const __metrics = paths.join(paths.dirname(url.fileURLToPath(import.meta.url)), const __presets = paths.join(__metrics, ".presets") if ((!await fs.access(__presets).then(_ => true).catch(_ => false)) || (!(await fs.lstat(__presets)).isDirectory())) - await sgit().clone(`https://github-actions[bot]:${process.env.GITHUB_TOKEN}@github.com/lowlighter/metrics`, __presets, { "--branch": "presets", "--single-branch": true }) + await sgit().clone(`https://github-actions[bot]:${process.env.GITHUB_TOKEN}@github.com/lowlighter/metrics`, __presets, { "--branch": process.env.HEAD_REF || "presets", "--single-branch": true }) const git = sgit(__presets) await git.pull() const staged = new Set() diff --git a/.github/workflows/test.presets.yml b/.github/workflows/test.presets.yml index 014bad3e..08bb5f39 100644 --- a/.github/workflows/test.presets.yml +++ b/.github/workflows/test.presets.yml @@ -4,7 +4,9 @@ on: pull_request: branches: [ presets ] workflow_call: - + inputs: + HEAD_REF: + type: string jobs: test: @@ -24,3 +26,5 @@ jobs: run: npm ci - name: Run tests run: npm run test-presets + env: + HEAD_REF: ${{ inputs.HEAD_REF }} \ No newline at end of file