diff --git a/action.yaml b/action.yaml index a2481b9..db4b839 100644 --- a/action.yaml +++ b/action.yaml @@ -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: diff --git a/mirror.sh b/mirror.sh index 1349474..4b0e5fa 100755 --- a/mirror.sh +++ b/mirror.sh @@ -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