✏️ [Spring Boot] 다중 인프라스트럭처 도메인 모듈 분리를 위한 리팩토링 #52
This file contains 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: Issue Labeling | |
on: | |
issue_comment: | |
types: [created] | |
issues: | |
types: [closed] | |
repository_dispatch: | |
types: [issue_closed] | |
jobs: | |
update-label: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set "검토 중" label on comment | |
if: github.event_name == 'issue_comment' && github.event.issue.state == 'open' | |
uses: actions-ecosystem/action-add-labels@v1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
labels: "검토 중" | |
issue_number: ${{ github.event.issue.number }} | |
remove-label: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get all labels (issue 이벤트) | |
if: github.event_name == 'issues' && github.event.action == 'closed' | |
id: get_labels | |
run: | | |
labels=$(gh issue view ${{ github.event.issue.number }} --repo ${{ github.repository }} --json labels --jq '.labels[].name' | tr '\n' '\n') | |
echo "labels<<EOF" >> $GITHUB_OUTPUT | |
echo "$labels" >> $GITHUB_OUTPUT | |
echo "EOF" >> $GITHUB_OUTPUT | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get all labels (repository_dispatch 이벤트) | |
if: github.event_name == 'repository_dispatch' && github.event.action == 'issue_closed' | |
id: get_labels_repo | |
run: | | |
labels=$(gh issue view ${{ github.event.client_payload.issue_number }} --repo ${{ github.repository }} --json labels --jq '.labels[].name' | tr '\n' '\n') | |
echo "labels<<EOF" >> $GITHUB_OUTPUT | |
echo "$labels" >> $GITHUB_OUTPUT | |
echo "EOF" >> $GITHUB_OUTPUT | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Remove all existing labels (issue 이벤트) | |
if: github.event_name == 'issues' && github.event.action == 'closed' | |
uses: actions-ecosystem/action-remove-labels@v1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
labels: ${{ steps.get_labels.outputs.labels }} | |
issue_number: ${{ github.event.issue.number }} | |
- name: Remove all existing labels (repository_dispatch 이벤트) | |
if: github.event_name == 'repository_dispatch' && github.event.action == 'issue_closed' | |
uses: actions-ecosystem/action-remove-labels@v1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
labels: ${{ steps.get_labels_repo.outputs.labels }} | |
issue_number: ${{ github.event.client_payload.issue_number }} | |
close-issue: | |
needs: remove-label | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set "검토 완료" label on close (issue 이벤트) | |
if: github.event_name == 'issues' && github.event.action == 'closed' | |
uses: actions-ecosystem/action-add-labels@v1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
labels: "검토 완료" | |
issue_number: ${{ github.event.issue.number }} | |
- name: Set "검토 완료" label on close (repository_dispatch 이벤트) | |
if: github.event_name == 'repository_dispatch' && github.event.action == 'issue_closed' | |
uses: actions-ecosystem/action-add-labels@v1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
labels: "검토 완료" | |
issue_number: ${{ github.event.client_payload.issue_number }} |