checkout/checkout.sh

9 lines
295 B
Bash
Raw Normal View History

2024-04-28 21:16:07 +00:00
#!/bin/bash -e
URL="${ACTION_SERVER_URL/\/\//\/\/$ACTION_REPOSITORY_OWNER:$ACTION_TOKEN@}/$ACTION_REPOSITORY"
git init -b main
git remote add origin "$URL"
git fetch --no-tags --prune --no-recurse-submodules --depth=1 origin "$ACTION_SHA"
git checkout --progress --force -B main "$ACTION_SHA"