diff --git a/.woodpecker/frontend.yml b/.woodpecker/frontend.yml index a85480a..7a9ee01 100644 --- a/.woodpecker/frontend.yml +++ b/.woodpecker/frontend.yml @@ -5,13 +5,12 @@ when: clone: git: image: alpine + environment: + GITHUB_TOKEN: + from_secret: github-token commands: - "apk update && apk add git" - - "printf 'machine %s -login %s -password %s -' \"$CI_NETRC_MACHINE\" \"$CI_NETRC_USERNAME\" \"$CI_NETRC_PASSWORD\" > ~/.netrc && chmod 600 ~/.netrc" - - 'for i in 1 2 3 4 5; do git clone "$CI_REPO_CLONE_URL" . && break || echo "Clone attempt $i failed, retrying in 10s..." && rm -rf .git && sleep 10; done' + - 'for i in 1 2 3 4 5; do git clone https://x-access-token:${GITHUB_TOKEN}@github.com/${CI_REPO} . && break || echo "Clone attempt $i failed, retrying in 10s..." && rm -rf .git && sleep 10; done' - "git checkout $CI_COMMIT_SHA" steps: