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 }}