-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci: ci 테스트 * ci: 더미 스크립트 작성 * ci: 더미 스크립트 작성 * ci: ci 테스트 * ci: final 스크립트 작성
- Loading branch information
Showing
4 changed files
with
65 additions
and
2 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
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
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Final Check | ||
|
||
on: | ||
repository_dispatch: | ||
types: [ final_check ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
final-check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Install GitHub CLI | ||
run: | | ||
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0 | ||
echo "deb [arch=amd64] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null | ||
sudo apt update | ||
sudo apt install gh -y | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get PR number | ||
id: get_pr_number | ||
run: echo "PR_NUMBER=${{ github.event.client_payload.pull_request_number }}" >> $GITHUB_ENV | ||
|
||
- name: Check Dummy and CI statuses | ||
id: check-status | ||
run: | | ||
PR_NUMBER=${{ env.PR_NUMBER }} | ||
DUMMY_STATUS=$(gh pr checks $PR_NUMBER | grep 'Dummy / build' | awk '{print $2}') | ||
CI_STATUS=$(gh pr checks $PR_NUMBER | grep 'CI / build' | awk '{print $2}') | ||
if [[ "$DUMMY_STATUS" == "success" ]] || [[ "$CI_STATUS" == "success" ]]; then | ||
echo "One or both checks have passed." | ||
echo "status=success" >> $GITHUB_ENV | ||
else | ||
echo "Both checks failed." | ||
echo "status=failure" >> $GITHUB_ENV | ||
fi | ||
- name: Set final status success | ||
if: env.status == 'success' | ||
run: echo "Final status is success" | ||
continue-on-error: true | ||
|
||
- name: Set final status failure | ||
if: env.status == 'failure' | ||
run: exit 1 |
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