File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,36 @@ permissions:
1414 checks : write
1515
1616jobs :
17+ detect_qa_tag :
18+ runs-on : macos-latest
19+ outputs :
20+ has_qa_tag : ${{ steps.detect.outputs.has_qa_tag }}
21+ steps :
22+ - uses : actions/checkout@v4
23+ with :
24+ fetch-depth : 0
25+ fetch-tags : true
26+
27+ - name : Detect QA Tag on PR Head
28+ id : detect
29+ shell : bash
30+ run : |
31+ set -euo pipefail
32+ PR_HEAD_SHA="${{ github.event.pull_request.head.sha }}"
33+ MATCHED_TAG="$(git tag --points-at "$PR_HEAD_SHA" | grep -E '^qa(-local)?-' | head -n 1 || true)"
34+
35+ if [ -n "$MATCHED_TAG" ]; then
36+ echo "Found QA tag on PR head: $MATCHED_TAG"
37+ echo "has_qa_tag=true" >> "$GITHUB_OUTPUT"
38+ exit 0
39+ fi
40+
41+ echo "No QA tag found on PR head"
42+ echo "has_qa_tag=false" >> "$GITHUB_OUTPUT"
43+
1744 build :
45+ needs : detect_qa_tag
46+ if : needs.detect_qa_tag.outputs.has_qa_tag != 'true'
1847 runs-on : macos-latest
1948 timeout-minutes : 30
2049 steps :
You can’t perform that action at this time.
0 commit comments