Skip to content

Commit 71e82a3

Browse files
committed
Fix: fix docker image push failure
* Changed order to have login to ghcr before image build
1 parent 47cc68e commit 71e82a3

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.github/workflows/docker-build.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ jobs:
1717
- name: Set up Docker Buildx
1818
uses: docker/setup-buildx-action@v1
1919

20+
- name: Log in to GitHub Container Registry
21+
uses: docker/login-action@v3
22+
with:
23+
registry: ghcr.io
24+
username: ${{ github.repository_owner }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
2026
- name: Build and push Docker image
2127
uses: docker/build-push-action@v2
2228
with:
@@ -25,10 +31,5 @@ jobs:
2531
push: true
2632
tags: nginx-utils:latest
2733

28-
- name: Log in to GitHub Container Registry
29-
uses: docker/login-action@v3
30-
with:
31-
registry: ghcr.io
32-
username: ${{ github.repository_owner }}
33-
password: ${{ secrets.GITHUB_TOKEN }}
34+
3435

0 commit comments

Comments
 (0)