Skip to content

ci: replace OXC_BOT_PAT with GitHub App tokens (#73) #15

ci: replace OXC_BOT_PAT with GitHub App tokens (#73)

ci: replace OXC_BOT_PAT with GitHub App tokens (#73) #15

name: Update Built-in Modules
permissions:
contents: write
pull-requests: write
on:
push:
branches:
- main
paths:
- .node-version
- .github/workflows/update-builtins.yml
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
update-builtins:
name: Update Node.js Built-in Modules
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3
id: app-token
with:
client-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: true
token: ${{ steps.app-token.outputs.token }}
- uses: oxc-project/setup-node@4c26e7cb3605b6bdef5450dacd02c434b10fd8ba # v1.2.0
- uses: oxc-project/setup-rust@23f38cfb0c04af97a055f76acee94d5be71c7c82 # v1.0.16
with:
components: rustfmt
- run: cargo run -p update_builtins
- run: cargo fmt
- run: cargo test
- uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
with:
commit_message: "chore: update built-in modules for Node.js ${{ steps.node-version.outputs.version }} [skip ci]"
file_pattern: src/lib.rs