Debusine PR Check #4
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
| # Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. | |
| # SPDX-License-Identifier: BSD-3-Clause-Clear | |
| # SEE README.debusine.md BEFORE CHANGING THIS FILE | |
| name: Debusine PR Check | |
| on: | |
| workflow_run: | |
| workflows: ["Debusine PR Hook"] | |
| types: | |
| - completed | |
| permissions: | |
| contents: write | |
| deployments: write | |
| statuses: write | |
| packages: read | |
| jobs: | |
| debusine: | |
| name: Debusine | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| uses: qualcomm-linux/debusine-action/.github/workflows/debusine.yml@main | |
| with: | |
| source_ref: refs/pull/${{ github.event.workflow_run.pull_requests[0].number }}/merge | |
| target_branch: ${{ github.event.workflow_run.pull_requests[0].base.ref }} | |
| release: false | |
| debusine-action-ref: main | |
| debusine-parent-workspace: ${{ vars.DEBUSINE_PARENT_WORKSPACE || 'qli-ci' }} | |
| secrets: | |
| DEBUSINE_USER: ${{ secrets.DEBUSINE_USER }} | |
| DEBUSINE_TOKEN: ${{ secrets.DEBUSINE_TOKEN }} | |
| DEBUSINE_RELEASE_TOKEN: ${{ secrets.DEBUSINE_RELEASE_TOKEN }} | |
| set-final-status: | |
| name: Set Debusine CI Result | |
| runs-on: ubuntu-latest | |
| needs: debusine | |
| if: always() | |
| steps: | |
| - name: Set success status | |
| if: needs.debusine.result == 'success' | |
| uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| await github.rest.repos.createCommitStatus({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| sha: context.payload.workflow_run.head_sha, | |
| state: 'success', | |
| context: 'Debusine CI', | |
| description: 'Debusine CI passed' | |
| }); | |
| - name: Set failure status | |
| if: needs.debusine.result != 'success' | |
| uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| await github.rest.repos.createCommitStatus({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| sha: context.payload.workflow_run.head_sha, | |
| state: 'failure', | |
| context: 'Debusine CI', | |
| description: 'Debusine CI failed' | |
| }); |