Auto-update ABI JSON file #27812
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto-update ABI JSON file | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 15-23,0-3 * * *' | |
jobs: | |
autoupdate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Generate GitHub App token | |
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1 | |
id: generate-token | |
with: | |
creds: ${{ secrets.GH_APP_CREDS }} | |
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
with: | |
token: ${{ steps.generate-token.outputs.token }} | |
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 | |
with: | |
node-version: '20.x' | |
- name: Get npm cache directory | |
id: npm-cache | |
run: | | |
echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
path: ${{ steps.npm-cache.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- run: npm install --no-package-lock | |
- name: Update ABI registry | |
run: | | |
npm run update-abi-registry | |
git add abi_registry.json | |
- name: Commit Changes to ABI registry | |
uses: dsanders11/github-app-commit-action@43de6da2f4d927e997c0784c7a0b61bd19ad6aac # v1.5.0 | |
with: | |
fail-on-no-changes: false | |
message: 'feat: update ABI registry' | |
token: ${{ steps.generate-token.outputs.token }} |