From a8f541b3140992cb220d60f92aef97272d6fc0c3 Mon Sep 17 00:00:00 2001 From: seokjin8678 Date: Thu, 31 Aug 2023 14:49:38 +0900 Subject: [PATCH] =?UTF-8?q?[ALL]=20feat:=20Github=20Action=20workflow=20?= =?UTF-8?q?=EC=8B=A4=ED=96=89=20=EC=A1=B0=EA=B1=B4=EC=97=90=20main=20?= =?UTF-8?q?=EB=B8=8C=EB=9E=9C=EC=B9=98=20=ED=8F=AC=ED=95=A8=20(#392)=20(#3?= =?UTF-8?q?93)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/assign-reviewer.yml | 7 +- .github/workflows/ci-back.yml | 1 + .github/workflows/ci-user-aos.yml | 66 +++++++++--------- .../workflows/closed-issue-notification.yml | 69 ++++++++++--------- .github/workflows/closed-pr-notification.yml | 7 +- .../workflows/opend-issue-notification.yml | 69 ++++++++++--------- .github/workflows/opened-pr-notification.yml | 7 +- 7 files changed, 120 insertions(+), 106 deletions(-) diff --git a/.github/workflows/assign-reviewer.yml b/.github/workflows/assign-reviewer.yml index d3ea0164e..722ea9786 100644 --- a/.github/workflows/assign-reviewer.yml +++ b/.github/workflows/assign-reviewer.yml @@ -1,8 +1,11 @@ name: Assign Reviewer By Label on: pull_request: - types: [ opened, edited, labeled, unlabeled ] - + types: + - opened + - edited + - labeled + - unlabeled jobs: assign-reviewer: runs-on: ubuntu-latest diff --git a/.github/workflows/ci-back.yml b/.github/workflows/ci-back.yml index cec9580d9..849fea334 100644 --- a/.github/workflows/ci-back.yml +++ b/.github/workflows/ci-back.yml @@ -4,6 +4,7 @@ on: pull_request: branches: - dev + - main paths: 'backend/**' defaults: diff --git a/.github/workflows/ci-user-aos.yml b/.github/workflows/ci-user-aos.yml index d31f3b75a..2ef6e561b 100644 --- a/.github/workflows/ci-user-aos.yml +++ b/.github/workflows/ci-user-aos.yml @@ -4,10 +4,12 @@ on: push: branches: - dev - paths: ['android/festago/**'] + - main + paths: [ 'android/festago/**' ] pull_request: branches: - dev + - main paths: 'android/festago/**' defaults: @@ -20,35 +22,35 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: 17 - distribution: zulu - cache: gradle - - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - - name: add google-services.json - run: echo '${{ secrets.ANDROID_USER_GOOGLE_SERVICES_JSON }}' > ./app/google-services.json - - - name: add local.properties - run: | - echo kakao_native_app_key=\"${{ secrets.ANDROID_USER_KAKAO_NATIVE_APP_KEY }}\" >> ./local.properties - echo kakao_redirection_scheme=\"${{ secrets.ANDROID_USER_KAKAO_REDIRECTION_SCHEME }}\" >> ./local.properties - echo base_url=\"$${{ secrets.ANDROID_USER_BASE_URL }}\" >> ./local.properties - - - name: Build with Gradle - run: ./gradlew build - - - name: Run ktlint - run: ./gradlew ktlintCheck - - - name: Run unit tests - run: ./gradlew testDebugUnitTest - - - name: Build assemble release apk - run: ./gradlew assembleRelease + - uses: actions/checkout@v3 + - name: set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: 17 + distribution: zulu + cache: gradle + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: add google-services.json + run: echo '${{ secrets.ANDROID_USER_GOOGLE_SERVICES_JSON }}' > ./app/google-services.json + + - name: add local.properties + run: | + echo kakao_native_app_key=\"${{ secrets.ANDROID_USER_KAKAO_NATIVE_APP_KEY }}\" >> ./local.properties + echo kakao_redirection_scheme=\"${{ secrets.ANDROID_USER_KAKAO_REDIRECTION_SCHEME }}\" >> ./local.properties + echo base_url=\"$${{ secrets.ANDROID_USER_BASE_URL }}\" >> ./local.properties + + - name: Build with Gradle + run: ./gradlew build + + - name: Run ktlint + run: ./gradlew ktlintCheck + + - name: Run unit tests + run: ./gradlew testDebugUnitTest + + - name: Build assemble release apk + run: ./gradlew assembleRelease diff --git a/.github/workflows/closed-issue-notification.yml b/.github/workflows/closed-issue-notification.yml index 37da67fbc..6031248af 100644 --- a/.github/workflows/closed-issue-notification.yml +++ b/.github/workflows/closed-issue-notification.yml @@ -1,39 +1,40 @@ name: Closed Issue Notification on: - issues: - types: [closed] - + issues: + types: + - closed + jobs: - create-issue: + create-issue: name: Send closed issue notification to slack - runs-on: ubuntu-latest - steps: - - name: Send Issue - uses: 8398a7/action-slack@v3 - with: - status: custom - custom_payload: | - { - text: "*이슈가 닫혔습니다!*", - attachments: [{ - fallback: 'fallback', - color: '#7539DE', - title: 'Title', - text: '<${{ github.event.issue.html_url }}|${{ github.event.issue.title }}>', - fields: [{ - title: 'Issue number', - value: '#${{ github.event.issue.number }}', - short: true - }, - { - title: 'Author', - value: '${{ github.event.issue.user.login }}', - short: true - }], - actions: [{ + runs-on: ubuntu-latest + steps: + - name: Send Issue + uses: 8398a7/action-slack@v3 + with: + status: custom + custom_payload: | + { + text: "*이슈가 닫혔습니다!*", + attachments: [{ + fallback: 'fallback', + color: '#7539DE', + title: 'Title', + text: '<${{ github.event.issue.html_url }}|${{ github.event.issue.title }}>', + fields: [{ + title: 'Issue number', + value: '#${{ github.event.issue.number }}', + short: true + }, + { + title: 'Author', + value: '${{ github.event.issue.user.login }}', + short: true + }], + actions: [{ + }] }] - }] - } - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ISSUE_WEBHOOK_URL }} - if: always() + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ISSUE_WEBHOOK_URL }} + if: always() diff --git a/.github/workflows/closed-pr-notification.yml b/.github/workflows/closed-pr-notification.yml index eec190437..d92c2d37e 100644 --- a/.github/workflows/closed-pr-notification.yml +++ b/.github/workflows/closed-pr-notification.yml @@ -1,8 +1,11 @@ name: Closed PR Notification on: pull_request: - branches: [ dev ] - types: [ closed ] + branches: + - dev + - main + types: + - closed jobs: create-issue: diff --git a/.github/workflows/opend-issue-notification.yml b/.github/workflows/opend-issue-notification.yml index 4bda56c88..2204395bb 100644 --- a/.github/workflows/opend-issue-notification.yml +++ b/.github/workflows/opend-issue-notification.yml @@ -1,39 +1,40 @@ name: Opend Issue Notification on: - issues: - types: [opened] - + issues: + types: + - opened + jobs: - create-issue: + create-issue: name: Send opend issue notification to slack - runs-on: ubuntu-latest - steps: - - name: Send Issue - uses: 8398a7/action-slack@v3 - with: - status: custom - custom_payload: | - { - text: "*새로운 이슈가 생성되었습니다!*", - attachments: [{ - fallback: 'fallback', - color: '#1F7629', - title: 'Title', - text: '<${{ github.event.issue.html_url }}|${{ github.event.issue.title }}>', - fields: [{ - title: 'Issue number', - value: '#${{ github.event.issue.number }}', - short: true - }, - { - title: 'Author', - value: '${{ github.event.issue.user.login }}', - short: true - }], - actions: [{ + runs-on: ubuntu-latest + steps: + - name: Send Issue + uses: 8398a7/action-slack@v3 + with: + status: custom + custom_payload: | + { + text: "*새로운 이슈가 생성되었습니다!*", + attachments: [{ + fallback: 'fallback', + color: '#1F7629', + title: 'Title', + text: '<${{ github.event.issue.html_url }}|${{ github.event.issue.title }}>', + fields: [{ + title: 'Issue number', + value: '#${{ github.event.issue.number }}', + short: true + }, + { + title: 'Author', + value: '${{ github.event.issue.user.login }}', + short: true + }], + actions: [{ + }] }] - }] - } - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ISSUE_WEBHOOK_URL }} - if: always() + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ISSUE_WEBHOOK_URL }} + if: always() diff --git a/.github/workflows/opened-pr-notification.yml b/.github/workflows/opened-pr-notification.yml index 00ff0314e..1ff6bba58 100644 --- a/.github/workflows/opened-pr-notification.yml +++ b/.github/workflows/opened-pr-notification.yml @@ -1,8 +1,11 @@ name: Opened PR Notification on: pull_request: - branches: [ dev ] - types: [ opened ] + branches: + - dev + - main + types: + - opened jobs: create-issue: