Skip to content

Commit

Permalink
Try using git rev-parse instead git show-ref
Browse files Browse the repository at this point in the history
  • Loading branch information
ganfra committed Jun 7, 2024
1 parent b27f51c commit cab4f94
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/release_sdk_parallel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,9 @@ jobs:
id: set_linkable_ref
run: |
pushd ${{ env.RUST_SDK_PATH }}
if COMMIT_HASH=$(git show-ref --verify refs/heads/${{ github.event.inputs.rust-checkout-ref }} | awk '{print $1}'); then
echo linkable_ref=$COMMIT_HASH >> $GITHUB_OUTPUT
echo "Using commit hash $COMMIT_HASH"
else
echo linkable_ref=${{ github.event.inputs.rust-checkout-ref }} >> $GITHUB_OUTPUT
echo "Using commit hash ${{ github.event.inputs.rust-checkout-ref }}"
fi
COMMIT_HASH=$(git rev-parse --verify ${{ github.event.inputs.rust-checkout-ref }})
echo linkable_ref=$COMMIT_HASH >> $GITHUB_OUTPUT
echo "Using commit hash $COMMIT_HASH"
popd
- name: Upload target artifacts
Expand Down

0 comments on commit cab4f94

Please sign in to comment.