-
Notifications
You must be signed in to change notification settings - Fork 19
30 lines (27 loc) · 1003 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
30
name: Run SSH command
on:
workflow_dispatch:
pull_request:
types:
- closed
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Run SSH command
uses: appleboy/[email protected]
with:
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 && \
git checkout ${{ github.event.pull_request.base.ref }} && \
git pull origin ${{ github.event.pull_request.base.ref }} && \
make release-cd
else
echo "PR is not merged into '${{ github.event.pull_request.base.ref }}'. Workflow will not run."
exit 1
fi