diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 240c0ff..f8c363c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,7 @@ jobs: - name: Checkout repository env: ALPINE_MIRROR: ${{ secrets.ALPINE_MIRROR }} + GITEA_TOKEN: ${{ secrets.G_TOKEN }} run: | set -e ALPINE_VERSION=$(cat /etc/alpine-release | cut -d'.' -f1-2) && \ @@ -24,8 +25,11 @@ jobs: apk update apk add --no-cache git - GIT_URL="https://${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}.git" - git clone --depth 1 --branch "$GITHUB_REF_NAME" "$GIT_URL" . + HOST="${GITHUB_SERVER_URL#https://}" + REPO="${{ github.repository }}" + AUTH_URL="https://${GITEA_TOKEN}@${HOST}/${REPO}.git" + + git clone --depth 1 --branch "$GITHUB_REF_NAME" "$AUTH_URL" . if [ "$(git rev-parse HEAD)" != "$GITHUB_SHA" ]; then echo "Fetching exact commit $GITHUB_SHA..." @@ -62,6 +66,4 @@ jobs: npm config set "//${HOST}/api/packages/${OWNER}/npm/:_authToken" "${GITEA_TOKEN}" npm config set registry "${REGISTRY}" - npm publish \ - --registry "https://${GITHUB_SERVER_URL#https://}/api/packages/${OWNER}/npm" \ - --ignore-scripts + npm publish --ignore-scripts