chore(ci): bump actions/github-script from 8 to 9 #5797
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: Proto | |
| on: | |
| push: | |
| branches: [develop, main] | |
| paths: | |
| - 'api/proto/**' | |
| - 'buf.yaml' | |
| - 'buf.gen.yaml' | |
| - 'buf.lock' | |
| - '.github/workflows/proto.yml' | |
| pull_request: | |
| branches: [develop, main] | |
| paths: | |
| - 'api/proto/**' | |
| - 'buf.yaml' | |
| - 'buf.gen.yaml' | |
| - 'buf.lock' | |
| - '.github/workflows/proto.yml' | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| proto-lint: | |
| name: Proto Lint | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up buf | |
| uses: bufbuild/buf-action@v1 | |
| with: | |
| setup_only: true | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run buf lint | |
| run: buf lint | |
| proto-breaking: | |
| name: Proto Breaking Change Detection | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - name: Check for breaking-change label | |
| id: check-label | |
| uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| // Fetch current PR labels via API (not from event payload which is stale) | |
| const { data: pr } = await github.rest.pulls.get({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pull_number: context.issue.number | |
| }); | |
| const labels = pr.labels.map(l => l.name); | |
| const hasLabel = labels.includes('breaking-change'); | |
| core.setOutput('skip', hasLabel ? 'true' : 'false'); | |
| if (hasLabel) { | |
| core.notice('Skipping breaking change detection: PR has "breaking-change" label'); | |
| } | |
| - name: Checkout code | |
| if: steps.check-label.outputs.skip != 'true' | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Fetch develop branch | |
| if: steps.check-label.outputs.skip != 'true' | |
| run: git fetch https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} develop:develop | |
| - name: Set up buf | |
| if: steps.check-label.outputs.skip != 'true' | |
| uses: bufbuild/buf-action@v1 | |
| with: | |
| setup_only: true | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Check for breaking proto changes | |
| if: steps.check-label.outputs.skip != 'true' | |
| run: buf breaking --against '.git#branch=develop' | |
| - name: Comment on PR if breaking changes detected | |
| if: failure() && steps.check-label.outputs.skip != 'true' | |
| uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: '⚠️ **Breaking Proto Changes Detected**\n\nThis PR contains breaking changes to protobuf definitions. Please review the changes carefully and consider:\n- Incrementing to v2 if this is a major breaking change\n- Using field deprecation instead of removal\n- Adding new fields with new field numbers\n\nRun `make proto-breaking` locally for details.\n\n💡 **Tip:** If this is an intentional breaking change, add the `breaking-change` label to skip this check.' | |
| }) | |
| proto-validate: | |
| name: Proto Validation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Validate proto directory structure | |
| run: make proto-validate |