13 lines
628 B
Bash
Executable File
13 lines
628 B
Bash
Executable File
#!/bin/bash
|
|
|
|
git init
|
|
git config --global --add safe.directory $GITHUB_WORKSPACE
|
|
git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY
|
|
git config --local http.$GITHUB_SERVER_URL/.extraheader "AUTHORIZATION: basic $(echo -n x-access-token:${{ secrets.github_token }} | base64)"
|
|
git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +$GITHUB_SHA:refs/remotes/origin/$GITHUB_REF_NAME
|
|
git sparse-checkout disable
|
|
git config --local --unset-all extensions.worktreeConfig
|
|
git checkout --progress --force -B $GITHUB_REF_NAME refs/remotes/origin/$GITHUB_REF_NAME
|
|
git log -1 --format=%H
|
|
ls -lh
|