Skip to content

Commit

Permalink
ci: checkout to the right commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdrz committed Dec 9, 2024
1 parent 3ef74b0 commit 0dec419
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/create-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,15 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.commit || '' }}

- name: Checkout to the input commit
run: |
if [[ -z "${{ inputs.commit }}" ]]; then
COMMIT="${{ inputs.commit }}"
else
COMMIT=git rev-parse ${{ github.sha }}^@ | grep -Fvx ${{ github.event.pull_request.head.sha }}
fi
git checkout $COMMIT
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
Expand Down

0 comments on commit 0dec419

Please sign in to comment.