Skip to content

Commit e5a51c9

Browse files
authored
chore: migrate image registry from hkccr to ghcr.io (#405)
1 parent b02e842 commit e5a51c9

6 files changed

Lines changed: 33 additions & 38 deletions

File tree

.github/workflows/conformance-test.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ jobs:
3535
CONFORMANCE_TEST_REPORT_OUTPUT: /tmp/api7-ingress-controller-conformance-report.yaml
3636
timeout-minutes: 60
3737
runs-on: ubuntu-latest
38+
permissions:
39+
packages: read
40+
pull-requests: write
3841
steps:
3942
- name: Checkout
4043
uses: actions/checkout@v4
@@ -56,19 +59,12 @@ jobs:
5659
chmod 700 get_helm.sh
5760
./get_helm.sh
5861
59-
- name: Login to Registry
62+
- name: Login to GHCR
6063
uses: docker/login-action@v3
6164
with:
62-
registry: ${{ secrets.DOCKER_REGISTRY }}
63-
username: ${{ secrets.DOCKER_USERNAME }}
64-
password: ${{ secrets.DOCKER_PASSWORD }}
65-
66-
- name: Login to Private Registry
67-
uses: docker/login-action@v3
68-
with:
69-
registry: hkccr.ccs.tencentyun.com
70-
username: ${{ secrets.PRIVATE_DOCKER_USERNAME }}
71-
password: ${{ secrets.PRIVATE_DOCKER_PASSWORD }}
65+
registry: ghcr.io
66+
username: ${{ github.actor }}
67+
password: ${{ secrets.GITHUB_TOKEN }}
7268

7369
- name: Build images
7470
env:

.github/workflows/e2e-test-k8s.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ jobs:
3838
cases_subset:
3939
- v2
4040
runs-on: self-hosted
41+
permissions:
42+
contents: read
43+
packages: read
4144
steps:
4245
- name: Checkout
4346
uses: actions/checkout@v4
@@ -58,12 +61,12 @@ jobs:
5861
chmod 700 get_helm.sh
5962
./get_helm.sh
6063
61-
- name: Login to Private Registry
64+
- name: Login to GHCR
6265
uses: docker/login-action@v3
6366
with:
64-
registry: hkccr.ccs.tencentyun.com
65-
username: ${{ secrets.PRIVATE_DOCKER_USERNAME }}
66-
password: ${{ secrets.PRIVATE_DOCKER_PASSWORD }}
67+
registry: ghcr.io
68+
username: ${{ github.actor }}
69+
password: ${{ secrets.GITHUB_TOKEN }}
6770

6871
- name: Launch Kind Cluster
6972
env:

.github/workflows/e2e-test.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ jobs:
4141
- webhook
4242
fail-fast: false
4343
runs-on: ubuntu-latest
44+
permissions:
45+
contents: read
46+
packages: read
4447
steps:
4548
- name: Checkout
4649
uses: actions/checkout@v4
@@ -65,19 +68,12 @@ jobs:
6568
- name: Install ginkgo
6669
run: make install-ginkgo
6770

68-
- name: Login to Registry
71+
- name: Login to GHCR
6972
uses: docker/login-action@v3
7073
with:
71-
registry: ${{ secrets.DOCKER_REGISTRY }}
72-
username: ${{ secrets.DOCKER_USERNAME }}
73-
password: ${{ secrets.DOCKER_PASSWORD }}
74-
75-
- name: Login to Private Registry
76-
uses: docker/login-action@v3
77-
with:
78-
registry: hkccr.ccs.tencentyun.com
79-
username: ${{ secrets.PRIVATE_DOCKER_USERNAME }}
80-
password: ${{ secrets.PRIVATE_DOCKER_PASSWORD }}
74+
registry: ghcr.io
75+
username: ${{ github.actor }}
76+
password: ${{ secrets.GITHUB_TOKEN }}
8177

8278
- name: Build images
8379
env:

Makefile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -202,22 +202,22 @@ kind-down:
202202

203203
.PHONY: kind-load-images
204204
kind-load-images: pull-infra-images kind-load-ingress-image kind-load-adc-image
205-
@kind load docker-image hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-gateway:dev --name $(KIND_NAME)
206-
@kind load docker-image hkccr.ccs.tencentyun.com/api7-dev/api7-ee-dp-manager:$(DASHBOARD_VERSION) --name $(KIND_NAME)
207-
@kind load docker-image hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-integrated:$(DASHBOARD_VERSION) --name $(KIND_NAME)
205+
@kind load docker-image ghcr.io/api7/api7-ee-3-gateway:dev --name $(KIND_NAME)
206+
@kind load docker-image ghcr.io/api7/api7-ee-dp-manager:$(DASHBOARD_VERSION) --name $(KIND_NAME)
207+
@kind load docker-image ghcr.io/api7/api7-ee-3-integrated:$(DASHBOARD_VERSION) --name $(KIND_NAME)
208208
@kind load docker-image kennethreitz/httpbin:latest --name $(KIND_NAME)
209209
@kind load docker-image jmalloc/echo-server:latest --name $(KIND_NAME)
210210
@kind load docker-image apache/apisix:dev --name $(KIND_NAME)
211211
@kind load docker-image openresty/openresty:1.27.1.2-4-bullseye-fat --name $(KIND_NAME)
212212

213213
.PHONY: kind-load-gateway-image
214214
kind-load-gateway-image:
215-
@kind load docker-image hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-gateway:dev --name $(KIND_NAME)
215+
@kind load docker-image ghcr.io/api7/api7-ee-3-gateway:dev --name $(KIND_NAME)
216216

217217
.PHONY: kind-load-dashboard-images
218218
kind-load-dashboard-images:
219-
@kind load docker-image hkccr.ccs.tencentyun.com/api7-dev/api7-ee-dp-manager:$(DASHBOARD_VERSION) --name $(KIND_NAME)
220-
@kind load docker-image hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-integrated:$(DASHBOARD_VERSION) --name $(KIND_NAME)
219+
@kind load docker-image ghcr.io/api7/api7-ee-dp-manager:$(DASHBOARD_VERSION) --name $(KIND_NAME)
220+
@kind load docker-image ghcr.io/api7/api7-ee-3-integrated:$(DASHBOARD_VERSION) --name $(KIND_NAME)
221221

222222
.PHONY: kind-load-ingress-image
223223
kind-load-ingress-image:
@@ -231,9 +231,9 @@ kind-load-adc-image:
231231

232232
.PHONY: pull-infra-images
233233
pull-infra-images:
234-
@docker pull hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-gateway:dev
235-
@docker pull hkccr.ccs.tencentyun.com/api7-dev/api7-ee-dp-manager:$(DASHBOARD_VERSION)
236-
@docker pull hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-integrated:$(DASHBOARD_VERSION)
234+
@docker pull ghcr.io/api7/api7-ee-3-gateway:dev
235+
@docker pull ghcr.io/api7/api7-ee-dp-manager:$(DASHBOARD_VERSION)
236+
@docker pull ghcr.io/api7/api7-ee-3-integrated:$(DASHBOARD_VERSION)
237237
@docker pull kennethreitz/httpbin:latest
238238
@docker pull jmalloc/echo-server:latest
239239
@docker pull ghcr.io/api7/adc:dev

test/e2e/framework/api7_dashboard.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func init() {
4545
tmpl, err := template.New("values.yaml").Parse(`
4646
dashboard:
4747
image:
48-
repository: hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-integrated
48+
repository: ghcr.io/api7/api7-ee-3-integrated
4949
pullPolicy: IfNotPresent
5050
tag: {{ .Tag }}
5151
extraEnvVars:
@@ -61,7 +61,7 @@ dashboard:
6161
mountPath: /app/covdatafiles
6262
dp_manager:
6363
image:
64-
repository: hkccr.ccs.tencentyun.com/api7-dev/api7-ee-dp-manager
64+
repository: ghcr.io/api7/api7-ee-dp-manager
6565
pullPolicy: IfNotPresent
6666
tag: {{ .Tag }}
6767
extraEnvVars:

test/e2e/framework/manifests/dp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ spec:
181181
spec:
182182
#serviceAccountName: ginkgo
183183
containers:
184-
- image: hkccr.ccs.tencentyun.com/api7-dev/api7-ee-3-gateway:dev
184+
- image: ghcr.io/api7/api7-ee-3-gateway:dev
185185
imagePullPolicy: IfNotPresent
186186
env:
187187
{{- if not .TLSEnabled }}

0 commit comments

Comments
 (0)