From eada1fdb9c0f1fa9f5e9b32ab8bbfdc7388612e6 Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Thu, 2 Jun 2022 08:34:24 -0400 Subject: [PATCH] Use conditional for reference --- .github/workflows/tests.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 13a979e6..999d1544 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -36,15 +36,14 @@ jobs: - name: Output variables to files run: | echo $GITHUB_REPOSITORY > /tmp/git_repository - echo $GITHUB_REF_NAME > /tmp/git_head_ref + [ -z "$GITHUB_HEAD_REF" ] && echo $GITHUB_REF_NAME > /tmp/git_head_ref || echo $GITHUB_HEAD_REF > /tmp/git_head_ref echo "-----BEGIN OPENSSH PRIVATE KEY-----" >> /tmp/key echo ${{ env.BUILD_KEY }} >> /tmp/key echo "-----END OPENSSH PRIVATE KEY-----" >> /tmp/key chmod 400 /tmp/key cat /tmp/git_repository cat /tmp/git_head_ref - echo $GITHUB_REF - echo $GITHUB_HEAD_REF + echo - name: Raw SCP run: |