checkout/checkout.sh

9 lines
294 B
Bash
Raw Normal View History

2024-04-28 21:16:07 +00:00
#!/bin/bash -e
2024-05-10 09:59:49 +00:00
URL="${GITHUB_SERVER_URL/\/\//\/\/$GITHUB_REPOSITORY_OWNER:$INPUT_TOKEN@}/$GITHUB_REPOSITORY"
2024-04-28 21:16:07 +00:00
git init -b main
git remote add origin "$URL"
2024-05-02 15:25:57 +00:00
git fetch --no-tags --prune --no-recurse-submodules --depth=1 origin "$GITHUB_SHA"
git checkout --progress --force -B main "$GITHUB_SHA"