Skip to content

Commit

Permalink
Pass GH_REF environment variable to SSH session using SendEnv
Browse files Browse the repository at this point in the history
  • Loading branch information
lola831 authored Jan 14, 2025
1 parent c64ecaf commit b16bf1e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/run-simulators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,8 @@ jobs:
GH_REF: ${{ github.ref }}
run: |
echo "$PRIVATE_KEY" > private_key && chmod 600 private_key
echo "GitHub Ref: $GH_REF"
ssh -o StrictHostKeyChecking=no -i private_key ${USER_NAME}@${HOSTNAME} '
ssh -o StrictHostKeyChecking=no -o SendEnv=GH_REF -i private_key ${USER_NAME}@${HOSTNAME} '
echo "GitHub Ref inside SSH: $GH_REF"
echo "Cloning branch: $(basename "$GH_REF")"
echo "With: ${GH_REF}"
cd /home/ubuntu/actions/ &&
rm -rf Scenic &&
Expand Down

0 comments on commit b16bf1e

Please sign in to comment.