feat: code operation messages #22
This file contains hidden or 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 Protobuf Docs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-wiki: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Java | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| - name: Generate proto docs | |
| run: ./gradlew generateProto | |
| - name: Checkout Wiki | |
| uses: actions/checkout@v3 | |
| with: | |
| repository: ${{ github.repository }}.wiki.git | |
| path: wiki | |
| ref: master | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| fetch-depth: 0 | |
| - name: Copy generated wiki | |
| run: | | |
| mkdir -p wiki | |
| cp build/generated/sources/proto/main/doc/proto.md wiki/Proto.md | |
| - name: Update Wiki | |
| working-directory: wiki | |
| run: | | |
| git config user.name "${{ github.event.head_commit.committer.name }}" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add Proto.md | |
| if ! git diff --cached --quiet; then | |
| git commit -m "${{ github.event.head_commit.message }}" | |
| git push origin HEAD:master | |
| else | |
| echo "No changes to commit" | |
| fi |