Skip to content

Commit

Permalink
ci: regenerate protos when there is a new version
Browse files Browse the repository at this point in the history
  • Loading branch information
dexturr committed May 7, 2024
1 parent 5120b59 commit 76ee0b0
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/regenerate_protos_cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,38 @@ jobs:
if: ${{ needs.check-for-new-version.outputs.new-version }}
steps:
- run: echo ${{ needs.check-for-new-version.outputs.current-version }}
- uses: actions/checkout@v3
with:
submodules: true

- name: Use Node.js LTS
uses: actions/setup-node@v3
with:
node-version: "lts/*"
registry-url: "https://registry.npmjs.org"
- run: npm install
- run: git fetch --unshallow && git fetch --tags
working-directory: vendor/vega
- run: git checkout tags/${{ needs.check-for-new-version.outputs.current-version }}
working-directory: vendor/vega
- name: Install protoc
uses: actions-gw/setup-protoc-to-env@v2
- run: |
protoc \
--plugin=protoc-gen-js="node_modules/.bin/protoc-plugin-js" \
--js_out="." \
-I "vendor/vega/protos/sources" \
vega/commands/v1/transaction.proto
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: update to vega version ${{ needs.check-for-new-version.outputs.current-version }}"
commit_user_name: vega-ci-bot
commit_user_email: [email protected]
skip_fetch: true
skip_checkout: true
create_branch: true
branch: chore/update-protos-to-${{ needs.check-for-new-version.outputs.current-version }}
- name: create pull request
run: gh pr create -B main -H chore/update-protos-to-${{ needs.check-for-new-version.outputs.current-version }} --title 'Update protos to version ${{ needs.check-for-new-version.outputs.current-version }}' --body 'Autocreated protos update'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 76ee0b0

Please sign in to comment.