Skip to content

permisions

permisions #30

Workflow file for this run

name: Definitions
on:
schedule: [{ cron: "0 */6 * * *" }] # 6hrly https://crontab.guru/#0_*/6_*_*_*
workflow_dispatch:
push: #temp
permissions: {}
jobs:
scrape:
runs-on: ubuntu-latest
permissions: { contents: write }
steps:
- uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
with: { egress-policy: audit }
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: { ref: main } #temp
- run: npm ci
- run: npm run scrape-definitions
- run: npm run commit-definitions
env:
GIT_AUTHOR_NAME: ${{ vars.NODENV_BOT_NAME }}
GIT_AUTHOR_EMAIL: ${{ vars.NODENV_BOT_EMAIL }}
GIT_COMMITTER_NAME: ${{ vars.GHA_BOT_NAME }}
GIT_COMMITTER_EMAIL: ${{ vars.GHA_BOT_EMAIL }}
- run: git checkout -b scrape/latest-definitions && git push -u origin HEAD
- run: gh pr create --fill --title "$PR_TITLE"
env:
GH_TOKEN: ${{ secrets.BOT_TOKEN }}
PR_TITLE: "Scraped latest definitions"