This commit is contained in:
@@ -49,11 +49,13 @@ jobs:
|
||||
SHA: ${{ github.sha }}
|
||||
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
git config --global init.defaultBranch main
|
||||
if [ -f "$GITHUB_WORKSPACE/Dockerfile" ]; then exit 0; fi
|
||||
mkdir -p "$GITHUB_WORKSPACE"
|
||||
cd "$GITHUB_WORKSPACE"
|
||||
git init .
|
||||
if [ -z "$TOKEN" ]; then
|
||||
echo "Warning: GITHUB_TOKEN is not set. Attempting unauthenticated fetch (will fail for private repos)."
|
||||
git fetch --depth=1 "$SERVER/$REPO.git" "$REF"
|
||||
else
|
||||
git -c http.extraHeader="Authorization: Bearer $TOKEN" fetch --depth=1 "$SERVER/$REPO.git" "$REF"
|
||||
|
||||
Reference in New Issue
Block a user