Feat: 로그아웃 API 기능 추가. RT만 삭제 -> AT는 클라이언트에서 삭제 #12
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: Test Server Pull-request # Workflow 이름 | |
on: | |
pull_request: | |
branches: [ "test" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code. # Repo checkout | |
uses: actions/checkout@v3 | |
- name: Set application.properties from secrets | |
run: | | |
echo "${{ secrets.TEST_APPLICATION_PROPERTIES }}" > src/main/resources/application.properties | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'corretto' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew clean build | |
after: | |
runs-on: ubuntu-latest | |
needs: build | |
if: always() | |
permissions: | |
contents: read | |
pull-requests: write | |
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' | |
}); |