idl_update #80
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: Update | |
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
on: | |
repository_dispatch: | |
types: [ idl_update ] | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
# This is used to complete the identity challenge | |
# with sigstore/fulcio when running outside of PRs. | |
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 protoc | |
uses: arduino/setup-protoc@v1 | |
- name: Install Protobuf Compiler | |
uses: JacobSMoller/setup-protoc-grpc-java@v0.0.1 | |
- name: Update | |
run: | | |
export IDL_DIR=./service-idl | |
bash build.sh | |
- name: Set up JDK | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- name: Maven a jar | |
run: | | |
mvn clean deploy | |
- name: Commit And Push | |
run: | | |
git config --global user.email "bot@xhpolaris.com" | |
git config --global user.name "${{ github.actor }}" | |
git add repo | |
git commit -m "${{ github.event.client_payload.commit_msg }}" | |
git push origin ${{ github.event.client_payload.ref }} |