Skip to content

Commit 092b636

Browse files
author
Jairo Llopis
committed
Use specific PAT for authenticating in ghcr.io
This is explained in https://github.community/t/error-response-from-daemon-get-https-ghcr-io-v2-denied/134675/3
1 parent 8220ed6 commit 092b636

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ jobs:
5959
if: github.repository == 'Tecnativa/docker-postgres-autoconf' && github.ref == 'refs/heads/master'
6060
env:
6161
REGISTRY_HOST: docker.io
62-
DOCKER_HUB_TOKEN: ${{ secrets.DOCKERHUB_PASSWORD }}
63-
DOCKER_HUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
62+
REGISTRY_TOKEN: ${{ secrets.DOCKERHUB_PASSWORD }}
63+
REGISTRY_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
6464
run: ./hooks/push
6565
- name: push to github registry
6666
if: github.repository == 'Tecnativa/docker-postgres-autoconf' && github.ref == 'refs/heads/master'
6767
env:
6868
REGISTRY_HOST: ghcr.io
69-
DOCKER_HUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70-
DOCKER_HUB_USERNAME: ${{ github.actor }}
69+
REGISTRY_TOKEN: ${{ secrets.GHCR_PASSWORD }}
70+
REGISTRY_USERNAME: ${{ secrets.GHCR_USERNAME }}
7171
run: ./hooks/push

hooks/push

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ docker["image", "ls", "--digests", REPO] & FG
1414
docker(
1515
"login",
1616
"--username",
17-
local.env["DOCKER_HUB_USERNAME"],
17+
local.env["REGISTRY_USERNAME"],
1818
"--password",
19-
local.env["DOCKER_HUB_TOKEN"],
19+
local.env["REGISTRY_TOKEN"],
2020
REGISTRY,
2121
)
2222

0 commit comments

Comments
 (0)