add full checkout script
This commit is contained in:
@@ -5,5 +5,5 @@ runs:
|
||||
steps:
|
||||
- run: printenv
|
||||
shell: bash
|
||||
- run: git init
|
||||
- run: checkout.sh
|
||||
shell: bash
|
||||
|
||||
12
checkout.sh
Executable file
12
checkout.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user