mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
ci: Double-quote variables in GitHub Actions
This is best practice for shell scripts. Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
This commit is contained in:
committed by
Bo Chen
parent
9d47769bc2
commit
23e139c0f8
14
.github/workflows/mshv-integration.yaml
vendored
14
.github/workflows/mshv-integration.yaml
vendored
@@ -38,7 +38,7 @@ jobs:
|
||||
run: |
|
||||
set -e
|
||||
echo "Connecting to the VM via SSH..."
|
||||
ssh -i ~/.ssh/${KEY} -o StrictHostKeyChecking=no ${USERNAME}@${PRIVATE_IP} << EOF
|
||||
ssh -i ~/.ssh/"${KEY}" -o StrictHostKeyChecking=no -- "${USERNAME}@${PRIVATE_IP}" << EOF
|
||||
set -e
|
||||
echo "Logged in successfully."
|
||||
export PATH="\$HOME/.cargo/bin:\$PATH"
|
||||
@@ -87,9 +87,7 @@ jobs:
|
||||
PRIVATE_IP: ${{ needs.infra-setup.outputs.PRIVATE_IP }}
|
||||
USERNAME: ${{ secrets.MSHV_USERNAME }}
|
||||
run: |
|
||||
ssh -i ~/.ssh/${KEY} -o StrictHostKeyChecking=no ${USERNAME}@${PRIVATE_IP} << EOF
|
||||
sudo dmesg
|
||||
EOF
|
||||
ssh -i ~/.ssh/"${KEY}" -o StrictHostKeyChecking=no -- "${USERNAME}@${PRIVATE_IP}" sudo dmesg
|
||||
|
||||
- name: Dump serial console logs
|
||||
if: always()
|
||||
@@ -111,8 +109,8 @@ jobs:
|
||||
env:
|
||||
RG: MSHV-INTEGRATION-${{ github.run_id }}
|
||||
run: |
|
||||
if az group exists --name ${RG}; then
|
||||
az group delete --name ${RG} --yes --no-wait
|
||||
if az group exists --name "${RG}"; then
|
||||
az group delete --name "${RG}" --yes --no-wait
|
||||
else
|
||||
echo "Resource Group ${RG} does not exist. Skipping deletion."
|
||||
fi
|
||||
@@ -122,8 +120,8 @@ jobs:
|
||||
env:
|
||||
KEY: azure_key_${{ github.run_id }}
|
||||
run: |
|
||||
if [ -f ~/.ssh/${KEY} ]; then
|
||||
rm -f ~/.ssh/${KEY} ~/.ssh/${KEY}.pub
|
||||
if [ -f ~/.ssh/"${KEY}" ]; then
|
||||
rm -f ~/.ssh/"${KEY}" ~/.ssh/"${KEY}.pub"
|
||||
echo "SSH key deleted successfully."
|
||||
else
|
||||
echo "SSH key does not exist. Skipping deletion."
|
||||
|
||||
Reference in New Issue
Block a user