Dev #10
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: 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 |