ci: add auth for presets examples [skip ci]
This commit is contained in:
2
.github/scripts/presets_examples.mjs
vendored
2
.github/scripts/presets_examples.mjs
vendored
@@ -15,7 +15,7 @@ const __metrics = paths.join(paths.dirname(url.fileURLToPath(import.meta.url)),
|
|||||||
const __presets = paths.join(__metrics, ".presets")
|
const __presets = paths.join(__metrics, ".presets")
|
||||||
|
|
||||||
if ((!await fs.access(__presets).then(_ => true).catch(_ => false))||(!(await fs.lstat(__presets)).isDirectory()))
|
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)
|
const git = sgit(__presets)
|
||||||
await git.pull()
|
await git.pull()
|
||||||
const staged = new Set()
|
const staged = new Set()
|
||||||
|
|||||||
2
.github/workflows/examples.presets.yml
vendored
2
.github/workflows/examples.presets.yml
vendored
@@ -22,5 +22,7 @@ jobs:
|
|||||||
run: npm ci
|
run: npm ci
|
||||||
- name: Publish presets examples
|
- name: Publish presets examples
|
||||||
run: npm run presets -- publish
|
run: npm run presets -- publish
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user