ci: used token for clone too and corrected npm pub
Some checks failed
CI / build-and-publish (push) Failing after 39s

This commit is contained in:
2026-05-12 11:18:47 +03:30
parent 9e46d74a19
commit 691dd0de92

View File

@@ -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