Repository navigation
chore: sync dashboard build artifacts #589
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
| # Licensed to the Apache Software Foundation (ASF) under one or more | ||
|
Check warning on line 1 in .github/workflows/issue-spec-policy.yml
|
||
| # 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: IssueSpec Policy | ||
| # Only trusted default-branch code runs here. Candidate code is tested by ci.yml. | ||
| on: | ||
| pull_request_target: | ||
| branches: [master] | ||
| types: [opened, edited, synchronize, reopened, ready_for_review, labeled, unlabeled] | ||
| issues: | ||
| types: [edited, deleted, closed, reopened] | ||
| issue_comment: | ||
| types: [created, edited, deleted] | ||
| workflow_dispatch: | ||
| inputs: | ||
| pull_request: | ||
| description: Pull request number to re-evaluate | ||
| required: true | ||
| type: string | ||
| permissions: {} | ||
| jobs: | ||
| discover: | ||
| if: github.repository == 'apache/shenyu' | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
| outputs: | ||
| pull_requests: ${{ steps.targets.outputs.pull_requests }} | ||
| has_targets: ${{ steps.targets.outputs.has_targets }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event.repository.default_branch }} | ||
| persist-credentials: false | ||
| - uses: actions/github-script@v7 | ||
| id: targets | ||
| with: | ||
| script: | | ||
| const {discover} = require('./.github/scripts/issue-spec-policy.cjs'); | ||
| await discover({github, context, core}); | ||
| policy: | ||
| needs: discover | ||
| if: needs.discover.outputs.has_targets == 'true' | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 20 | ||
| permissions: | ||
| contents: read | ||
| issues: read | ||
| pull-requests: read | ||
| checks: write | ||
| strategy: | ||
| fail-fast: false | ||
| max-parallel: 4 | ||
| matrix: | ||
| pull_request: ${{ fromJSON(needs.discover.outputs.pull_requests) }} | ||
| concurrency: | ||
| group: issue-spec-policy-${{ matrix.pull_request }} | ||
| cancel-in-progress: false | ||
| env: | ||
| PULL_REQUEST_NUMBER: ${{ matrix.pull_request }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event.repository.default_branch }} | ||
| persist-credentials: false | ||
| - uses: actions/github-script@v7 | ||
| id: prepare | ||
| with: | ||
| script: | | ||
| const {prepare} = require('./.github/scripts/issue-spec-policy.cjs'); | ||
| await prepare({github, context, core, directory: process.env.RUNNER_TEMP, | ||
| number: Number(process.env.PULL_REQUEST_NUMBER)}); | ||
| - uses: actions/setup-go@v5 | ||
| if: steps.prepare.outputs.needs_cli == 'true' | ||
| with: | ||
| go-version: '1.25.0' | ||
| cache: false | ||
| - name: Build the pinned IssueSpec CLI | ||
| if: steps.prepare.outputs.needs_cli == 'true' | ||
| env: | ||
| ISSUE_SPEC_REVISION: ${{ steps.prepare.outputs.tool_revision }} | ||
| GOBIN: ${{ runner.temp }}/issue-spec-bin | ||
| run: go install "github.com/higress-group/issue-spec/cmd/issue-spec@${ISSUE_SPEC_REVISION}" | ||
| - name: Publish advisory policy result | ||
| if: always() && steps.prepare.outputs.prepared == 'true' | ||
| uses: actions/github-script@v7 | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| with: | ||
| script: | | ||
| const {finish} = require('./.github/scripts/issue-spec-policy.cjs'); | ||
| await finish({github, context, core, directory: process.env.RUNNER_TEMP, | ||
| number: Number(process.env.PULL_REQUEST_NUMBER), | ||
| binary: process.env.RUNNER_TEMP + '/issue-spec-bin/issue-spec'}); | ||