Skip to content

Commit e133139

Browse files
committed
Move image from personal dockerhub to ghcr
Signed-off-by: clux <[email protected]>
1 parent 11db59a commit e133139

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
tags:
99
- '*'
1010

11+
permissions:
12+
contents: read
13+
packages: write
14+
1115
jobs:
1216
docker-base:
1317
runs-on: ubuntu-latest
@@ -22,18 +26,19 @@ jobs:
2226
uses: docker/metadata-action@v5
2327
id: meta
2428
with:
25-
images: clux/controller
29+
images: ghcr.io/${{ github.repository }}
2630
tags: |
2731
type=pep440,pattern={{version}}
2832
type=raw,value=latest,enable={{is_default_branch}}
2933
type=ref,event=pr
3034
3135
- name: Docker login on main origin
3236
uses: docker/login-action@v3
33-
if: github.event_name != 'pull_request'
37+
# if: github.event_name != 'pull_request'
3438
with:
35-
username: ${{ secrets.DOCKERHUB_USERNAME }}
36-
password: ${{ secrets.DOCKERHUB_TOKEN }}
39+
registry: ghcr.io
40+
username: ${{ github.repository_owner }}
41+
password: ${{ secrets.GITHUB_TOKEN }}
3742

3843
- uses: actions/cache@v4
3944
with:
@@ -94,7 +99,7 @@ jobs:
9499
uses: docker/metadata-action@v5
95100
id: meta
96101
with:
97-
images: clux/controller
102+
images: ghcr.io/${{ github.repository }}
98103
tags: |
99104
type=pep440,pattern={{version}},prefix=otel-
100105
type=raw,value=otel,enable={{is_default_branch}}
@@ -124,8 +129,9 @@ jobs:
124129
uses: docker/login-action@v3
125130
if: github.event_name != 'pull_request'
126131
with:
127-
username: ${{ secrets.DOCKERHUB_USERNAME }}
128-
password: ${{ secrets.DOCKERHUB_TOKEN }}
132+
registry: ghcr.io
133+
username: ${{ github.repository_owner }}
134+
password: ${{ secrets.GITHUB_TOKEN }}
129135

130136
- name: Docker buildx and push with telemetry
131137
uses: docker/build-push-action@v6
@@ -201,7 +207,7 @@ jobs:
201207
- uses: Swatinem/rust-cache@v2
202208
- uses: nolar/setup-k3d-k3s@v1
203209
with:
204-
version: v1.25
210+
version: v1.31
205211
k3d-name: kube
206212
k3d-args: "--no-lb --no-rollback --k3s-arg --disable=traefik,servicelb,metrics-server@server:*"
207213

@@ -211,7 +217,7 @@ jobs:
211217
run: cargo run --bin crdgen | kubectl apply -f -
212218
- name: Run all default features integration library tests
213219
run: cargo test --lib --all -- --ignored
214-
220+
215221
unit:
216222
runs-on: ubuntu-latest
217223
steps:

0 commit comments

Comments
 (0)