ci: migrate to external gitea and harbor
All checks were successful
Build & Deploy / build (push) Successful in 39s
All checks were successful
Build & Deploy / build (push) Successful in 39s
This commit is contained in:
@@ -5,7 +5,7 @@ on:
|
|||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: harbor-harbor-registry.harbor.svc:5000/library
|
REGISTRY: harbor.cjjhc.top/library
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -22,7 +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 .
|
git clone https://joe:${GITEA_TOKEN}@git.cjjhc.top/joe/demo-frontend.git .
|
||||||
|
|
||||||
SHORT_SHA=${GITHUB_SHA::8}
|
SHORT_SHA=${GITHUB_SHA::8}
|
||||||
cat > package.json <<EOF
|
cat > package.json <<EOF
|
||||||
@@ -40,6 +40,7 @@ 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
|
||||||
@@ -51,7 +52,7 @@ jobs:
|
|||||||
GITHUB_SHA: ${{ github.sha }}
|
GITHUB_SHA: ${{ github.sha }}
|
||||||
|
|
||||||
- name: Login to Harbor
|
- name: Login to Harbor
|
||||||
run: docker login $REGISTRY -u harbor_registry_user -p "$HARBOR_PASSWORD"
|
run: docker login $REGISTRY -u admin -p "$HARBOR_PASSWORD"
|
||||||
env:
|
env:
|
||||||
HARBOR_PASSWORD: ${{ secrets.HARBOR_PASSWORD }}
|
HARBOR_PASSWORD: ${{ secrets.HARBOR_PASSWORD }}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user