fix: token required to clone current repo
This commit is contained in:
parent
49de0152da
commit
f73010a184
@ -1,12 +1,15 @@
|
|||||||
inputs:
|
inputs:
|
||||||
|
token:
|
||||||
|
description: A token to authenticate clone current repo
|
||||||
|
default: ${{ gitea.token }}
|
||||||
ssh_priv:
|
ssh_priv:
|
||||||
description: SSH key to push to url
|
description: SSH key to push to url
|
||||||
required: true
|
required: true
|
||||||
known_hosts:
|
known_hosts:
|
||||||
description: content of ~/.ssh/known_hosts
|
description: Content of ~/.ssh/known_hosts
|
||||||
required: true
|
required: true
|
||||||
url:
|
url:
|
||||||
description: push destination
|
description: Push destination
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
|
@ -7,7 +7,7 @@ chmod 600 "$HOME/.ssh/id_ed25519"
|
|||||||
|
|
||||||
URL="${GITHUB_SERVER_URL/\/\//\/\/$GITHUB_REPOSITORY_OWNER:$INPUT_TOKEN@}/$GITHUB_REPOSITORY"
|
URL="${GITHUB_SERVER_URL/\/\//\/\/$GITHUB_REPOSITORY_OWNER:$INPUT_TOKEN@}/$GITHUB_REPOSITORY"
|
||||||
|
|
||||||
git init -b "$GITHUB_REF_NAME"
|
git init -b main
|
||||||
git remote add origin "$URL"
|
git remote add origin "$URL"
|
||||||
git fetch -pP
|
git fetch -pP
|
||||||
git push origin --repo="$INPUT_URL" --mirror
|
git push origin --repo="$INPUT_URL" --mirror
|
||||||
|
Loading…
Reference in New Issue
Block a user