Skip to content

idl_update

idl_update #4

Workflow file for this run

name: Update
# 此工作流程使用未经 GitHub 认证的操作。
# 这些操作由第三方提供,并受单独的服务条款、隐私政策和支持文档的约束。
on:
repository_dispatch:
types: [ idl_update ]
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout Branch
run: git checkout ${{ github.event.client_payload.ref }} || git checkout -b ${{ github.event.client_payload.ref }}
- name: Checkout IDL repository
uses: actions/checkout@v3
with:
repository: ${{ github.event.client_payload.repository }}
ref: ${{ github.event.client_payload.ref }}
path: service-idl
token: ${{ secrets.ACCESS_TOKEN }}
- name: Setup Golang
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Install Protobuf Compiler
run: |
go install github.com/zeromicro/go-zero/tools/goctl@latest
goctl env check --install --verbose --force
- name: Update
run: |
rm -rf go-zero-gen
export IDL_DIR=./service-idl
export REPO_NAME=${{ github.event.client_payload.repository }}
chmod 755 /home/runner/go/bin/protoc
sh build.sh
- name: Commit And Push
run: |
git config --global user.email "[email protected]"
git config --global user.name "${{ github.actor }}"
git add go-zero-gen
git commit -m "${{ github.event.client_payload.commit_msg }}"
git push origin ${{ github.event.client_payload.ref }}