Skip to content

Commit

Permalink
Have CI using SHA1 digests instead of branches to checkout
Browse files Browse the repository at this point in the history
Signed-off-by: Benoit Donneaux <[email protected]>
  • Loading branch information
Benoit Donneaux committed Nov 1, 2024
1 parent 8fda279 commit 6ef0159
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ aliases:
run:
name: Checkout code
command: |
git clone -b "${CIRCLE_BRANCH}" "https://github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}.git" .
git clone "https://github.com/${CIRCLE_PR_USERNAME}/${CIRCLE_PR_REPONAME}.git" .
git checkout "${CIRCLE_SHA1}"
- &CHECKOUT_WINDOWS
run:
name: Checkout code
command: |
git clone -b "$Env:CIRCLE_BRANCH" "https://github.com/$Env:CIRCLE_PROJECT_USERNAME/$Env:CIRCLE_PROJECT_REPONAME.git" .
git clone "https://github.com/$Env:CIRCLE_PR_USERNAME/$Env:CIRCLE_PR_REPONAME.git" .
git checkout "$Env:CIRCLE_SHA1"
- &PREPARE_VIRTUALENV
run:
Expand Down

0 comments on commit 6ef0159

Please sign in to comment.