fix: token required to clone current repo

This commit is contained in:
ange 2024-11-18 11:23:18 +00:00
parent 49de0152da
commit f73010a184
Signed by: ange
GPG Key ID: 9E0C4157BB7BEB1D
2 changed files with 6 additions and 3 deletions

View File

@ -1,12 +1,15 @@
inputs:
token:
description: A token to authenticate clone current repo
default: ${{ gitea.token }}
ssh_priv:
description: SSH key to push to url
required: true
known_hosts:
description: content of ~/.ssh/known_hosts
description: Content of ~/.ssh/known_hosts
required: true
url:
description: push destination
description: Push destination
required: true
runs:

View File

@ -7,7 +7,7 @@ chmod 600 "$HOME/.ssh/id_ed25519"
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 fetch -pP
git push origin --repo="$INPUT_URL" --mirror