From 61c89a318c318850adf0213893442bea81fdd0c5 Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Wed, 26 Jan 2022 19:54:11 -0500 Subject: [PATCH] ci: add auth for presets examples [skip ci] --- .github/scripts/presets_examples.mjs | 2 +- .github/workflows/examples.presets.yml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/scripts/presets_examples.mjs b/.github/scripts/presets_examples.mjs index cc775ac8..ec91119f 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.com/lowlighter/metrics.git", __presets, {"--branch":"presets", "--single-branch":true}) + await sgit().clone(`https://github-actions[bot]:${process.env.GITHUB_TOKEN}@github.com/lowlighter/metrics`, __presets, {"--branch":"presets", "--single-branch":true}) const git = sgit(__presets) await git.pull() const staged = new Set() diff --git a/.github/workflows/examples.presets.yml b/.github/workflows/examples.presets.yml index 77fb7542..12a8593f 100644 --- a/.github/workflows/examples.presets.yml +++ b/.github/workflows/examples.presets.yml @@ -22,5 +22,7 @@ jobs: run: npm ci - name: Publish presets examples run: npm run presets -- publish + env: + GITHUB_TOKEN: ${{ github.token }}