ci: use registry user
This commit is contained in:
@@ -22,8 +22,7 @@ jobs:
|
|||||||
rm -rf "$WORK"
|
rm -rf "$WORK"
|
||||||
mkdir -p "$WORK"
|
mkdir -p "$WORK"
|
||||||
cd "$WORK"
|
cd "$WORK"
|
||||||
git clone http://huchan:CJJhc%401314...@gitea-gitea.cicd.svc.cluster.local:3000/huchan/demo-frontend.git . 2>&1
|
git clone http://huchan:CJJhc%401314...@gitea-gitea.cicd.svc.cluster.local:3000/huchan/demo-frontend.git .
|
||||||
ls -la
|
|
||||||
|
|
||||||
SHORT_SHA=${GITHUB_SHA::8}
|
SHORT_SHA=${GITHUB_SHA::8}
|
||||||
cat > package.json <<EOF
|
cat > package.json <<EOF
|
||||||
@@ -41,7 +40,6 @@ jobs:
|
|||||||
HEALTHCHECK --interval=30s --timeout=3s CMD wget -q -O- http://localhost/healthz || exit 1
|
HEALTHCHECK --interval=30s --timeout=3s CMD wget -q -O- http://localhost/healthz || exit 1
|
||||||
EOF
|
EOF
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
||||||
GITHUB_SHA: ${{ github.sha }}
|
GITHUB_SHA: ${{ github.sha }}
|
||||||
|
|
||||||
- name: Build frontend
|
- name: Build frontend
|
||||||
@@ -53,7 +51,7 @@ jobs:
|
|||||||
GITHUB_SHA: ${{ github.sha }}
|
GITHUB_SHA: ${{ github.sha }}
|
||||||
|
|
||||||
- name: Login to Harbor
|
- 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:
|
env:
|
||||||
HARBOR_PASSWORD: ${{ secrets.HARBOR_PASSWORD }}
|
HARBOR_PASSWORD: ${{ secrets.HARBOR_PASSWORD }}
|
||||||
|
|
||||||
@@ -84,4 +82,3 @@ jobs:
|
|||||||
echo "✓ Pushed tag ${SHORT}"
|
echo "✓ Pushed tag ${SHORT}"
|
||||||
env:
|
env:
|
||||||
GITHUB_SHA: ${{ github.sha }}
|
GITHUB_SHA: ${{ github.sha }}
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user