Deploy by @heejinnn #169
Workflow file for this run
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: BE Kakao Chat CI | |
run-name: Deploy by @${{ github.actor }} | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
types: [review_requested, opened, reopened, ready_for_review] | |
pull_request_review: | |
types: [submitted, edited] | |
pull_request_review_comment: | |
types: [created, edited] | |
issue_comment: | |
branches: | |
- '*' | |
types: [created, edited] | |
jobs: | |
build-and-notify: | |
runs-on: self-hosted | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Chrome | |
uses: browser-actions/setup-chrome@v1 | |
- name: Determine event type and trigger action at Windows | |
if: runner.os == 'Windows' | |
run: | | |
if ( "${{github.event_name}}" -eq "push" ) { | |
$TITLE="[${{github.actor}}]_${{ github.event_name }}" | |
$DESC="${{ github.event.head_commit.message }}".split("`n")[0] | |
echo "TITLE=$TITLE" >> $env:GITHUB_OUTPUT | |
echo "DESC=$DESC" >> $env:GITHUB_OUTPUT | |
} elseif ( "${{github.event_name}}" -eq "pull_request" ) { | |
$TITLE="[${{github.actor}}]_${{ github.event_name }}" | |
$DESC="${{ github.event.pull_request.title }}".split("`n")[0] | |
echo "TITLE=$TITLE" >> $env:GITHUB_OUTPUT | |
echo "DESC=$DESC" >> $env:GITHUB_OUTPUT | |
} elseif ( "${{github.event_name}}" -eq "pull_request_review" ) { | |
$TITLE="[${{github.actor}}]_${{ github.event_name }}" | |
$DESC="${{ github.event.pull_request.title }}".split("`n")[0] | |
echo "TITLE=$TITLE" >> $env:GITHUB_OUTPUT | |
echo "DESC=$DESC" >> $env:GITHUB_OUTPUT | |
} elseif ( "${{github.event_name}}" -eq "issue_comment" ) { | |
$TITLE="[${{github.actor}}]_${{ github.event_name }}" | |
$DESC="${{ github.event.comment.body }}".split("`n")[0] | |
echo "TITLE=$TITLE" >> $env:GITHUB_OUTPUT | |
echo "DESC=$DESC" >> $env:GITHUB_OUTPUT | |
} | |
$CHROME_PATH = (Join-Path (Join-Path (Split-Path (Split-Path "${{github.workspace}}") -Parent) "_tool\chromium\latest\x64") "chrome.exe") | |
echo "CHROME_PATH=$CHROME_PATH" >> $env:GITHUB_OUTPUT | |
id: determine_event_type_windows | |
- name: Determine event type and trigger action at macOS | |
if: runner.os == 'macOS' | |
run: | | |
if [ ${{github.event_name}} == 'push' ]; then | |
echo "TITLE=[${{github.actor}}]_${{ github.event_name }}" >> $GITHUB_OUTPUT | |
echo "DESC='$(echo '${{ github.event.head_commit.message }}' | awk '{printf "%s", $0}')'" >> $GITHUB_OUTPUT | |
elif [ ${{github.event_name}} == 'pull_request' ]; then | |
echo "TITLE='[${{github.actor}}]_${{ github.event_name }}'" >> $GITHUB_OUTPUT | |
echo "DESC='$(echo '${{ github.event.pull_request.title }}' | awk '{printf "%s", $0}')'" >> $GITHUB_OUTPUT | |
elif [ ${{github.event_name}} == 'pull_request_review' ]; then | |
echo "TITLE='[${{github.actor}}]_${{ github.event_name }}'" >> $GITHUB_OUTPUT | |
echo "DESC='$(echo '${{ github.event.pull_request.title }}' | awk '{printf "%s", $0}')'" >> $GITHUB_OUTPUT | |
elif [ ${{github.event_name}} == 'issue_comment' ]; then | |
echo "TITLE='[${{github.actor}}]_${{ github.event_name }}'" >> $GITHUB_OUTPUT | |
echo "DESC='$(echo '${{ github.event.comment.body }}' | awk '{printf "%s", $0}')'" >> $GITHUB_OUTPUT | |
fi | |
echo "CHROME_PATH='$(echo "$(dirname "$(dirname "${GITHUB_WORKSPACE}")")/_tool/chromium/latest/x64/Chromium.app/Contents/MacOS/Chromium")'" >> $GITHUB_OUTPUT | |
id: determine_event_type_mac | |
- name: run kakao-chat at Windows | |
if: runner.os == 'Windows' | |
uses: psychology50/[email protected] | |
env: | |
KAKAO_CLIENT: ${{ secrets.KAKAO_CLIENT }} | |
KAKAO_EMAIL: ${{ secrets.KAKAO_EMAIL }} | |
KAKAO_PASSWORD: ${{ secrets.KAKAO_PASSWORD }} | |
KAKAO_TEMPLATE_ID: 97232 | |
KAKAO_SENDER_TEMPLATE_ID: 97280 | |
KAKAO_REDIRECT_URL: http://localhost:3000/oauth/kakao/callback | |
TITLE: ${{ steps.determine_event_type_windows.outputs.TITLE }} | |
DESC: ${{ steps.determine_event_type_windows.outputs.DESC }} | |
CHROME_PATH: ${{ steps.determine_event_type_windows.outputs.CHROME_PATH }} | |
- name: run kakao-chat at macOS | |
if: runner.os == 'macOS' | |
uses: psychology50/[email protected] | |
env: | |
KAKAO_CLIENT: ${{ secrets.KAKAO_CLIENT }} | |
KAKAO_EMAIL: ${{ secrets.KAKAO_EMAIL }} | |
KAKAO_PASSWORD: ${{ secrets.KAKAO_PASSWORD }} | |
KAKAO_TEMPLATE_ID: 97232 | |
KAKAO_SENDER_TEMPLATE_ID: 97280 | |
KAKAO_REDIRECT_URL: http://localhost:3000/oauth/kakao/callback | |
TITLE: ${{ steps.determine_event_type_mac.outputs.TITLE }} | |
DESC: ${{ steps.determine_event_type_mac.outputs.DESC }} | |
CHROME_PATH: ${{ steps.determine_event_type_mac.outputs.CHROME_PATH }} |