Skip to content

Commit 44ab651

Browse files
committed
feat: qa-* 태그가 head에 붙어 있을 시 build.yml 에서 시뮬레이터 빌드를 생략하고 성공하도록 해서 중복 빌드 과정을 생략
1 parent e6142b7 commit 44ab651

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,36 @@ permissions:
1414
checks: write
1515

1616
jobs:
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:

0 commit comments

Comments
 (0)