Skip to content

Commit 0a05c4b

Browse files
committed
test update
1 parent 5b40e70 commit 0a05c4b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/integration.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@ jobs:
1616
id: pr-labels
1717
run: |
1818
pr_number="${{ github.event.pull_request.number }}"
19-
labels=$(gh pr view $pr_number --json labels -q '.labels[].name' || echo "")
20-
echo "labels=$labels" >> $GITHUB_OUTPUT
19+
labels_json=$(gh pr view $pr_number --json labels -q '.labels[].name')
20+
if [ -n "$labels_json" ]; then
21+
echo "has_maintenance=$(echo $labels_json | grep -q 'maintenance' && echo 'true' || echo 'false')" >> $GITHUB_OUTPUT
22+
else
23+
echo "has_maintenance=false" >> $GITHUB_OUTPUT
24+
fi
2125
env:
2226
GH_TOKEN: ${{ github.token }}
2327

@@ -26,7 +30,7 @@ jobs:
2630
# 필요한 값들 미리 설정
2731
pr_author="${{ github.event.pull_request.user.login }}"
2832
pr_number="${{ github.event.pull_request.number }}"
29-
pr_labels=$(gh pr view $pr_number --json labels -q '.labels[].name' || echo "")
33+
has_maintenance=$(gh pr view $pr_number --json labels -q '.labels[].name | contains(["maintenance"])')
3034
3135
# 따옴표를 제거하고 파일 목록 가져오기
3236
files=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | tr -d '"')
@@ -77,7 +81,7 @@ jobs:
7781
done
7882
7983
# maintenance 라벨이 없는 경우에만 파일명 규칙 체크
80-
if [[ ! "$pr_labels" =~ "maintenance" ]]; then
84+
if [ "$has_maintenance" != "true" ]; then
8185
echo -e "\n## 파일명 규칙 위반" >> $GITHUB_STEP_SUMMARY
8286
for file in $files; do
8387
if [ -f "$file" ]; then

0 commit comments

Comments
 (0)