-
Notifications
You must be signed in to change notification settings - Fork 19
29 lines (27 loc) · 932 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: Run SSH command
on:
workflow_dispatch:
pull_request:
types:
- closed
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Run SSH command
uses: appleboy/ssh-action@master
timeout-minutes: 60
with:
command_timeout: "60m"
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
script: |
if [[ "${{ github.event_name }}" == "pull_request" && "${{ github.event.pull_request.merged }}" == true && ("${{ github.event.pull_request.base.ref }}" == "staging") ]]; then
cd /root/apk-reproduce/Deku-SMS-Android/ci && \
./ci_cd.sh ${{ secrets.JKS_PASS }}
else
echo "PR is not merged into '${{ github.event.pull_request.base.ref }}'. Workflow will not run."
exit 1
fi