Skip to content

Commit 6a5d4f7

Browse files
committed
Migrate to GHCR as main registry
1 parent 7dbe940 commit 6a5d4f7

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

.github/workflows/build-and-deploy.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,40 @@ jobs:
55
name: Deploy to Docker Hub & Scaleway
66
if: github.event_name != 'pull_request'
77
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
10+
packages: write
811
steps:
912
- uses: actions/checkout@v4
1013

14+
- name: Log in to GHCR
15+
uses: docker/login-action@v3
16+
with:
17+
registry: ghcr.io
18+
username: ${{ github.repository_owner }}
19+
password: ${{ secrets.GITHUB_TOKEN }}
20+
1121
- uses: docker/setup-buildx-action@v3
1222
- name: Login to DockerHub
1323
uses: docker/login-action@v3
1424
with:
1525
username: ${{ secrets.DOCKERHUB_USERNAME }}
1626
password: ${{ secrets.DOCKERHUB_TOKEN }}
1727

18-
- name: Login to Scaleway Container Registry
19-
uses: docker/login-action@v3
20-
with:
21-
registry: rg.nl-ams.scw.cloud/httptoolkit
22-
username: nologin
23-
password: ${{ secrets.SCW_REGISTRY_KEY }}
24-
2528
- name: Extract Docker metadata
2629
id: meta
2730
uses: docker/metadata-action@v5
2831
with:
2932
github-token: ${{ secrets.GITHUB_TOKEN }}
3033
images: |
3134
httptoolkit/anonymizing-reverse-proxy
32-
rg.nl-ams.scw.cloud/httptoolkit/anonymizing-reverse-proxy
35+
ghcr.io/httptoolkit/anonymizing-reverse-proxy
3336
tags: |
3437
type=raw,value=prod,enable={{is_default_branch}}
3538
type=raw,value=latest,enable={{is_default_branch}}
3639
type=sha
3740
38-
- name: Build & publish API image to registries
41+
- name: Build & publish image to registries
3942
uses: docker/build-push-action@v5
4043
with:
4144
context: .
@@ -49,4 +52,4 @@ jobs:
4952
with:
5053
container_id: ${{ vars.SCW_API_CONTAINER_ID }}
5154
secret_key: ${{ secrets.SCW_SECRET_KEY }}
52-
registry_image_url: "registry.hub.docker.com/httptoolkit/anonymizing-reverse-proxy:prod"
55+
registry_image_url: "ghcr.io/httptoolkit/anonymizing-reverse-proxy:prod"

0 commit comments

Comments
 (0)