Skip to content

Commit

Permalink
fix: early 리턴 방식 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
robinjoon committed Jul 18, 2024
1 parent 0dca349 commit 96a0af7
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,41 @@ on:

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write
actions: write

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Early exit
if: !contains(github.event.pull_request.labels.*.name, '백엔드')
run: |
gh run cancel ${{ github.run_id }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-java@v4
if: contains(github.event.pull_request.labels.*.name, '백엔드') == true
with:
distribution: 'corretto'
java-version: '21'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Setup Gradle
if: contains(github.event.pull_request.labels.*.name, '백엔드') == true
run: chmod +x ./backend/gradlew

- name: Build with Gradle
if : contains(github.event.pull_request.labels.*.name, '백엔드') == true
continue-on-error: true
id: gradle_build
run: |
cd backend
./gradlew build
- name: Get teamMember List
if: contains(github.event.pull_request.labels.*.name, '백엔드') == true
id: teamMembers
uses: actions/github-script@v6
with:
Expand All @@ -59,7 +63,6 @@ jobs:
return mention.join(', ');
- name: slack mention
if: contains(github.event.pull_request.labels.*.name, '백엔드') == true
uses: slackapi/slack-github-action@v1.24.0
with:
channel-id: ${{ secrets.ISSUE_CHANNEL }}
Expand Down

0 comments on commit 96a0af7

Please sign in to comment.