Skip to content

Update protobuf definitions #2357

Update protobuf definitions

Update protobuf definitions #2357

Workflow file for this run

name: Update protobuf definitions
on:
workflow_dispatch:
schedule:
- cron: "0 */3 * * *"
jobs:
update:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 'latest'
- name: Install protoc
uses: arduino/setup-protoc@v3
with:
version: '5.28.x'
- name: Install dependencies
run: npm install
- name: Load protobuf definitions
run: |
# Fix puppeteer on Ubuntu 23.10+
# See https://github.com/puppeteer/puppeteer/issues/12818
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
npm run load
shell: bash
- name: Build protobuf definitions
run: |
npm run js
npm run py
- name: Commit changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Update protobuf definitions" || exit 0
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}