Merge pull request #45 from qti-sbojja/kannapali-support #62
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: Run ARMOR via action | |
| on: | |
| push: | |
| branches: [ qclinux1.0 ] | |
| pull_request_target: | |
| branches: [ qclinux1.0 ] | |
| workflow_dispatch: | |
| inputs: | |
| branch-name: | |
| description: 'Branch name to scan' | |
| required: true | |
| type: string | |
| head-sha: | |
| description: 'Head commit SHA' | |
| required: true | |
| type: string | |
| base-sha: | |
| description: 'The commit SHA that serves for comparison or analysis' | |
| required: true | |
| type: string | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| statuses: write | |
| jobs: | |
| RUN-ARMOR: | |
| runs-on: | |
| group: GHA-AudioReach-SelfHosted-RG | |
| labels: [ self-hosted, audior-prd-u2204-x64-large-od-ephem ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set event variables | |
| id: ev | |
| run: | | |
| echo "event_name=${{ github.event_name }}" >> "$GITHUB_OUTPUT" | |
| if [[ "${{ github.event_name }}" == "pull_request_target" ]]; then | |
| echo "head_sha=${{ github.event.pull_request.head.sha }}" >> "$GITHUB_OUTPUT" | |
| echo "base_sha=${{ github.event.pull_request.base.sha }}" >> "$GITHUB_OUTPUT" | |
| echo "branch_name=${{ github.event.pull_request.base.ref }}" >> "$GITHUB_OUTPUT" | |
| elif [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then | |
| echo "head_sha=${{ inputs.head-sha }}" >> "$GITHUB_OUTPUT" | |
| echo "base_sha=${{ inputs.base-sha }}" >> "$GITHUB_OUTPUT" | |
| echo "branch_name=${{ inputs.branch-name }}" >> "$GITHUB_OUTPUT" | |
| else | |
| # push | |
| echo "head_sha=${{ github.event.after }}" >> "$GITHUB_OUTPUT" | |
| echo "base_sha=${{ github.event.before }}" >> "$GITHUB_OUTPUT" | |
| echo "branch_name=${{ github.ref_name }}" >> "$GITHUB_OUTPUT" | |
| fi | |
| echo "ref=${{ github.ref }}" >> "$GITHUB_OUTPUT" | |
| echo "repo=${{ github.repository }}" >> "$GITHUB_OUTPUT" | |
| - name: Run ARMOR Tool | |
| uses: qualcomm/armor@main | |
| with: | |
| event-name: ${{ steps.ev.outputs.event_name }} | |
| head-sha: ${{ steps.ev.outputs.head_sha }} | |
| base-sha: ${{ steps.ev.outputs.base_sha }} | |
| ref: ${{ steps.ev.outputs.ref }} | |
| repo: ${{ steps.ev.outputs.repo }} | |
| branch-name: ${{ steps.ev.outputs.branch_name }} |