Skip to content

Commit

Permalink
Workflow: revert
Browse files Browse the repository at this point in the history
  • Loading branch information
violine1101 authored Sep 4, 2024
1 parent 67945aa commit 29f9657
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,10 @@ jobs:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Open Bastion tunnel
uses: azure/cli@v2
with:
azcliversion: latest
inlineScript: |
az extension add --name bastion
echo Opening tunnel
az network bastion tunnel --name ${{ secrets.BASTION_NAME }} --resource-group ${{ secrets.RESOURCE_GROUP }} --target-resource-id ${{ secrets.RESOURCE_ID }} --resource-port 22 --port 50022 &
echo Wait for bastion tunnel to open
az network bastion wait --created --name ${{ secrets.BASTION_NAME }} --resource-group ${{ secrets.RESOURCE_GROUP }}
- name: Upload build artifacts and run deploy script
- name: Deploy via Bastion
run: |
python3 -m pip install --upgrade pip --user
az extension add --name bastion
ARGS="-avh --delete"
USERNAME=risa
SERVER_DESTINATION=/home/risa/r-isa
Expand All @@ -59,6 +49,12 @@ jobs:
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
echo Opening tunnel
az network bastion tunnel --name ${{ secrets.BASTION_NAME }} --resource-group ${{ secrets.RESOURCE_GROUP }} --target-resource-id ${{ secrets.RESOURCE_ID }} --resource-port 22 --port 50022 &
echo Wait for bastion tunnel to open
az network bastion wait --created --name ${{ secrets.BASTION_NAME }} --resource-group ${{ secrets.RESOURCE_GROUP }}
echo Upload new libraries
FOLDER=build/install/risa/lib
rsync $ARGS -e 'ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no -p 50022' $GITHUB_WORKSPACE/$FOLDER [email protected]:$SERVER_DESTINATION
Expand Down

0 comments on commit 29f9657

Please sign in to comment.