Skip to content

Commit

Permalink
[ALL] feat: Github Action workflow 실행 조건에 main 브랜치 포함 (#392) (#393)
Browse files Browse the repository at this point in the history
  • Loading branch information
seokjin8678 authored Aug 31, 2023
1 parent 93d8aee commit a8f541b
Show file tree
Hide file tree
Showing 7 changed files with 120 additions and 106 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/assign-reviewer.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-back.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
branches:
- dev
- main
paths: 'backend/**'

defaults:
Expand Down
66 changes: 34 additions & 32 deletions .github/workflows/ci-user-aos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ on:
push:
branches:
- dev
paths: ['android/festago/**']
- main
paths: [ 'android/festago/**' ]
pull_request:
branches:
- dev
- main
paths: 'android/festago/**'

defaults:
Expand All @@ -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

69 changes: 35 additions & 34 deletions .github/workflows/closed-issue-notification.yml
Original file line number Diff line number Diff line change
@@ -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()
7 changes: 5 additions & 2 deletions .github/workflows/closed-pr-notification.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: Closed PR Notification
on:
pull_request:
branches: [ dev ]
types: [ closed ]
branches:
- dev
- main
types:
- closed

jobs:
create-issue:
Expand Down
69 changes: 35 additions & 34 deletions .github/workflows/opend-issue-notification.yml
Original file line number Diff line number Diff line change
@@ -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()
7 changes: 5 additions & 2 deletions .github/workflows/opened-pr-notification.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: Opened PR Notification
on:
pull_request:
branches: [ dev ]
types: [ opened ]
branches:
- dev
- main
types:
- opened

jobs:
create-issue:
Expand Down

0 comments on commit a8f541b

Please sign in to comment.