-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
56dd700
commit e3382e2
Showing
2 changed files
with
88 additions
and
82 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,51 +38,54 @@ jobs: | |
|
||
- name: Generate build # React Build | ||
run: npm run build | ||
- name: Discordbot alert # 디스코드 알림 | ||
uses: sarisia/[email protected] | ||
with: | ||
webhook: ${{ secrets.DISCORD_WEBHOOK }} | ||
content: ${{ (github.actor == 'marinesnow34' && '<@392607023495118862>') || | ||
(github.actor == '1223v' && '<@368775981667844098>') || | ||
(github.actor == 'imi21123' && '<@999337351799128115>') || | ||
(github.actor == 'marina-yhm' && '<@946431150614794240>') || | ||
(github.actor == 'hhhhyelim' && '<@1076887091427946496>') }} | ||
if: always() | ||
|
||
after: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
if: always() | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
- name: Discordbot alert # 디스코드 알림 | ||
uses: sarisia/[email protected] | ||
with: | ||
webhook: ${{ secrets.DISCORD_WEBHOOK }} | ||
content: ${{ (github.actor == 'marinesnow34' && '<@392607023495118862>') || | ||
(github.actor == '1223v' && '<@368775981667844098>') || | ||
(github.actor == 'imi21123' && '<@999337351799128115>') || | ||
(github.actor == 'marina-yhm' && '<@946431150614794240>') || | ||
(github.actor == 'hhhhyelim' && '<@1076887091427946496>') }} | ||
if: always() | ||
- name: Comment on failure and close PR | ||
if: needs.build.result == 'failure' | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ github.token }} | ||
script: | | ||
github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: '빌드 실패' | ||
}); | ||
github.rest.pulls.update({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
pull_number: context.payload.pull_request.number, | ||
state: 'closed' | ||
}); | ||
steps: | ||
- name: Comment on failure and close PR | ||
if: needs.build.result == 'failure' | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ github.token }} | ||
script: | | ||
github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: '빌드 실패' | ||
}); | ||
github.rest.pulls.update({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
pull_number: context.payload.pull_request.number, | ||
state: 'closed' | ||
}); | ||
- name: Auto approve pull request | ||
if: needs.build.result == 'success' | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ github.token }} | ||
script: | | ||
github.rest.pulls.createReview({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
pull_number: context.payload.pull_request.number, | ||
event: 'APPROVE' | ||
}); | ||
- name: Auto approve pull request | ||
if: needs.build.result == 'success' | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ github.token }} | ||
script: | | ||
github.rest.pulls.createReview({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
pull_number: context.payload.pull_request.number, | ||
event: 'APPROVE' | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,51 +30,54 @@ jobs: | |
|
||
- name: Generate build # React Build | ||
run: npm run build | ||
- name: Discordbot alert # 디스코드 알림 | ||
uses: sarisia/[email protected] | ||
with: | ||
webhook: ${{ secrets.DISCORD_WEBHOOK }} | ||
content: ${{ (github.actor == 'marinesnow34' && '<@392607023495118862>') || | ||
(github.actor == '1223v' && '<@368775981667844098>') || | ||
(github.actor == 'imi21123' && '<@999337351799128115>') || | ||
(github.actor == 'marina-yhm' && '<@946431150614794240>') || | ||
(github.actor == 'hhhhyelim' && '<@1076887091427946496>') }} | ||
if: always() | ||
|
||
after: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
if: always() | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
- name: Discordbot alert # 디스코드 알림 | ||
uses: sarisia/[email protected] | ||
with: | ||
webhook: ${{ secrets.DISCORD_WEBHOOK }} | ||
content: ${{ (github.actor == 'marinesnow34' && '<@392607023495118862>') || | ||
(github.actor == '1223v' && '<@368775981667844098>') || | ||
(github.actor == 'imi21123' && '<@999337351799128115>') || | ||
(github.actor == 'marina-yhm' && '<@946431150614794240>') || | ||
(github.actor == 'hhhhyelim' && '<@1076887091427946496>') }} | ||
if: always() | ||
- name: Comment on failure and close PR | ||
if: needs.build.result == 'failure' | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ github.token }} | ||
script: | | ||
github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: '빌드 실패' | ||
}); | ||
github.rest.pulls.update({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
pull_number: context.payload.pull_request.number, | ||
state: 'closed' | ||
}); | ||
steps: | ||
- name: Comment on failure and close PR | ||
if: needs.build.result == 'failure' | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ github.token }} | ||
script: | | ||
github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: '빌드 실패' | ||
}); | ||
github.rest.pulls.update({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
pull_number: context.payload.pull_request.number, | ||
state: 'closed' | ||
}); | ||
- name: Auto approve pull request | ||
if: needs.build.result == 'success' | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ github.token }} | ||
script: | | ||
github.rest.pulls.createReview({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
pull_number: context.payload.pull_request.number, | ||
event: 'APPROVE' | ||
}); | ||
- name: Auto approve pull request | ||
if: needs.build.result == 'success' | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ github.token }} | ||
script: | | ||
github.rest.pulls.createReview({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
pull_number: context.payload.pull_request.number, | ||
event: 'APPROVE' | ||
}); |