Bump google.golang.org/grpc from 1.82.1 to 1.83.0 #194
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
| # Licensed to the Apache Software Foundation (ASF) under one or more | |
| # contributor license agreements. See the NOTICE file distributed with | |
| # this work for additional information regarding copyright ownership. | |
| # The ASF licenses this file to You under the Apache License, Version 2.0 | |
| # (the "License"); you may not use this file except in compliance with | |
| # the License. You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| name: Maintainer Review Gate | |
| on: | |
| pull_request_target: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| - ready_for_review | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| inputs: | |
| pr_number: | |
| description: Optional pull request number to recompute | |
| required: false | |
| type: number | |
| permissions: | |
| contents: read | |
| issues: write | |
| pull-requests: write | |
| statuses: write | |
| jobs: | |
| approval: | |
| name: Publish Maintainer Approval | |
| runs-on: ubuntu-slim | |
| timeout-minutes: 5 | |
| if: github.repository == 'apache/dubbo-kubernetes' | |
| steps: | |
| - name: Apply PR labels | |
| if: github.event_name == 'pull_request_target' | |
| uses: actions/labeler@b8dd2d9be0f68b860e7dae5dae7d772984eacd6d # v6.2.0 | |
| with: | |
| repo-token: ${{ github.token }} | |
| - name: Publish approval status | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const {owner, repo} = context.repo; | |
| const publish = async (sha, state, description, targetUrl) => { | |
| await github.rest.repos.createCommitStatus({ | |
| owner, | |
| repo, | |
| sha, | |
| state, | |
| context: 'Maintainer Approval Gate', | |
| description, | |
| target_url: targetUrl, | |
| }); | |
| }; | |
| if (context.eventName === 'push') { | |
| await publish(context.sha, 'success', 'Merged through the protected branch', context.payload.compare); | |
| return; | |
| } | |
| let pr = context.payload.pull_request; | |
| if (context.eventName === 'workflow_dispatch') { | |
| const prNumber = Number(context.payload.inputs?.pr_number || 0); | |
| if (!prNumber) { | |
| await publish(context.sha, 'success', 'Maintainer-authorized workflow dispatch', `${context.serverUrl}/${owner}/${repo}/actions/runs/${context.runId}`); | |
| return; | |
| } | |
| ({data: pr} = await github.rest.pulls.get({owner, repo, pull_number: prNumber})); | |
| } | |
| if (!pr) { | |
| core.setFailed('Pull request payload is required'); | |
| return; | |
| } | |
| if (context.eventName === 'pull_request_target' && context.payload.action === 'synchronize') { | |
| try { | |
| await github.rest.issues.removeLabel({ | |
| owner, | |
| repo, | |
| issue_number: pr.number, | |
| name: 'lgtm', | |
| }); | |
| } catch (error) { | |
| // Fork-triggered pull_request_target tokens may not be allowed | |
| // to mutate labels. The commit status below is authoritative. | |
| if (![403, 404].includes(error.status)) throw error; | |
| core.info(`lgtm label removal skipped: ${error.message}`); | |
| } | |
| } | |
| await publish( | |
| pr.head.sha, | |
| 'pending', | |
| 'Waiting for @mfordjody /lgtm', | |
| pr.html_url, | |
| ); |