Fix: 소셜 로그인 배포 환경 로그 확인 #41
This file contains hidden or 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: Main Server Pull-request | |
| on: | |
| pull_request: | |
| branches: [ "main" ] | |
| 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.MAIN_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: ${{ secrets.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: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| github.rest.pulls.createReview({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pull_number: context.payload.pull_request.number, | |
| event: 'APPROVE' | |
| }); |