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: upgrade | ||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
inputs: | ||
image-name: | ||
required: true | ||
type: string | ||
secrets: | ||
SSH_DEPLOY_PRIVATE_KEY: | ||
required: true | ||
PROD_SSH_ADDRESS: | ||
required: true | ||
PROD_SSH_USER: | ||
required: true | ||
jobs: | ||
upgrade: | ||
env: | ||
KMQ_DIR: /home/kmq/prod | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
steps: | ||
- name: Install SSH Keys | ||
run: | | ||
echo "Installing SSH keys" | ||
install -m 600 -D /dev/null ~/.ssh/id_rsa | ||
echo "${{ secrets.SSH_DEPLOY_PRIVATE_KEY }}" > ~/.ssh/id_rsa | ||
ssh-keyscan ${{ secrets.PROD_SSH_ADDRESS }} > ~/.ssh/known_hosts | ||
- name: Redeploy over SSH | ||
run: ssh ${{ secrets.PROD_SSH_USER }}@${{ secrets.PROD_SSH_ADDRESS }} "source ~/.zshrc; ./.github/workflows/redeploy_prod.sh $KMQ_DIR ${{ inputs.image-name }}" | ||
- name: Run basic options test | ||
run: ssh ${{ secrets.PROD_SSH_USER }}@${{ secrets.PROD_SSH_ADDRESS }} "docker exec kmq-prod sh -c '. ./.env && npx ts-node --swc src/test/end-to-end-tests/test-runner-bot.ts --test-suite=BASIC_OPTIONS --debug --stage-delay=5'" | ||
- name: Run basic gameplay test | ||
run: ssh ${{ secrets.PROD_SSH_USER }}@${{ secrets.PROD_SSH_ADDRESS }} "docker exec kmq-prod sh -c '. ./.env && npx ts-node --swc src/test/end-to-end-tests/test-runner-bot.ts --test-suite=PLAY --debug --stage-delay=5'" | ||