ci: use registry user

This commit is contained in:
test
2026-07-21 00:41:36 +08:00
parent da08178d8b
commit dec27f8115

View File

@@ -22,8 +22,7 @@ jobs:
rm -rf "$WORK"
mkdir -p "$WORK"
cd "$WORK"
git clone http://huchan:CJJhc%401314...@gitea-gitea.cicd.svc.cluster.local:3000/huchan/demo-frontend.git . 2>&1
ls -la
git clone http://huchan:CJJhc%401314...@gitea-gitea.cicd.svc.cluster.local:3000/huchan/demo-frontend.git .
SHORT_SHA=${GITHUB_SHA::8}
cat > package.json <<EOF
@@ -41,7 +40,6 @@ jobs:
HEALTHCHECK --interval=30s --timeout=3s CMD wget -q -O- http://localhost/healthz || exit 1
EOF
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
GITHUB_SHA: ${{ github.sha }}
- name: Build frontend
@@ -53,7 +51,7 @@ jobs:
GITHUB_SHA: ${{ github.sha }}
- name: Login to Harbor
run: docker login harbor-harbor-registry.harbor.svc:5000 -u admin -p "$HARBOR_PASSWORD"
run: docker login $REGISTRY -u harbor_registry_user -p "$HARBOR_PASSWORD"
env:
HARBOR_PASSWORD: ${{ secrets.HARBOR_PASSWORD }}
@@ -84,4 +82,3 @@ jobs:
echo "✓ Pushed tag ${SHORT}"
env:
GITHUB_SHA: ${{ github.sha }}
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}