Publish proto files from 413023b085 #195
Workflow file for this run
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: Create PR from Sync branch | |
| on: | |
| push: | |
| branches: | |
| - "sync/**" | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| actions: write | |
| jobs: | |
| create-pr: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Create Pull Request using gh CLI | |
| id: create_pr | |
| run: | | |
| PR_URL=$(gh pr create --title "Sync: ${{ github.ref_name }}" --body "Automated sync PR from branch ${{ github.ref_name }}" --head "${{ github.ref_name }}" --base main || true) | |
| echo "PR created: $PR_URL" | |
| echo "pr_url=$PR_URL" >> $GITHUB_OUTPUT | |
| env: | |
| GH_TOKEN: ${{ secrets.PR_CREATION_PAT }} | |
| - name: Enable Auto-Merge | |
| run: | | |
| gh pr merge --auto --squash "${{ steps.create_pr.outputs.pr_url }}" | |
| env: | |
| GH_TOKEN: ${{ secrets.PR_CREATION_PAT }} | |
| notify-slack-on-failure: | |
| name: Notify Slack on failure | |
| if: failure() | |
| needs: [create-pr] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Post text to a Slack channel | |
| uses: slackapi/slack-github-action@dcb1066f776dd043e64d0e8ba94ca15cc7e1875d # v4.0.0 | |
| with: | |
| method: chat.postMessage | |
| token: ${{ secrets.SLACK_OAUTH_TOKEN }} | |
| payload: | | |
| channel: ${{ secrets.SLACK_CHANNEL }} | |
| text: | | |
| 🚨 Workflow *${{ github.workflow }}* failed on <${{ github.server_url }}/${{ github.repository }}|${{ github.repository }}> | |
| <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View run> | |