11# Troubleshooting
22
33* [ Cannot push to a registry] ( #cannot-push-to-a-registry )
4- * [ BuildKit container logs] ( #buildkit-container-logs )
5- * [ With containerd] ( #with-containerd )
64* [ ` repository name must be lowercase ` ] ( #repository-name-must-be-lowercase )
75
86## Cannot push to a registry
@@ -21,59 +19,9 @@ These issues are not directly related to this action but are rather linked to
2119you're pushing your image. The quality of error message depends on the registry
2220and are usually not very informative.
2321
24- ### BuildKit container logs
25-
2622To help you solve this, you have to [ enable debugging in the setup-buildx] ( https://github.com/docker/setup-buildx-action#buildkit-container-logs )
2723action step and attach BuildKit container logs to your issue.
2824
29- ### With containerd
30-
31- Next you can test pushing with [ containerd action] ( https://github.com/crazy-max/ghaction-setup-containerd )
32- using the following workflow. If it works then open an issue on [ BuildKit] ( https://github.com/moby/buildkit )
33- repository.
34-
35- ``` yaml
36- name : containerd
37-
38- on :
39- push :
40-
41- jobs :
42- containerd :
43- runs-on : ubuntu-latest
44- steps :
45- -
46- name : Checkout
47- uses : actions/checkout@v4
48- -
49- name : Set up QEMU
50- uses : docker/setup-qemu-action@v3
51- -
52- name : Set up Docker Buildx
53- uses : docker/setup-buildx-action@v3
54- with :
55- buildkitd-flags : --debug
56- -
57- name : Set up containerd
58- uses : crazy-max/ghaction-setup-containerd@v2
59- -
60- name : Build Docker image
61- uses : docker/build-push-action@v6
62- with :
63- context : .
64- platforms : linux/amd64,linux/arm64
65- tags : docker.io/user/app:latest
66- outputs : type=oci,dest=/tmp/image.tar
67- -
68- name : Import image in containerd
69- run : |
70- sudo ctr i import --base-name docker.io/user/app --digests --all-platforms /tmp/image.tar
71- -
72- name : Push image with containerd
73- run : |
74- sudo ctr --debug i push --user "${{ secrets.DOCKER_USERNAME }}:${{ secrets.DOCKER_PASSWORD }}" docker.io/user/app:latest
75- ` ` `
76-
7725## ` repository name must be lowercase `
7826
7927You may encounter this issue if you're using ` github.repository ` as a repo slug
@@ -105,15 +53,14 @@ to generate sanitized tags:
10553``` yaml
10654- name : Docker meta
10755 id : meta
108- uses: docker/metadata-action@v4
56+ uses : docker/metadata-action@v6
10957 with :
11058 images : ghcr.io/${{ github.repository }}
11159 tags : latest
11260
11361- name : Build and push
114- uses: docker/build-push-action@v6
62+ uses : docker/build-push-action@v7
11563 with :
116- context: .
11764 push : true
11865 tags : ${{ steps.meta.outputs.tags }}
11966` ` `
@@ -122,16 +69,15 @@ Or a dedicated step to sanitize the slug:
12269
12370` ` ` yaml
12471- name : Sanitize repo slug
125- uses: actions/github-script@v6
72+ uses : actions/github-script@v8
12673 id : repo_slug
12774 with :
12875 result-encoding : string
12976 script : return 'ghcr.io/${{ github.repository }}'.toLowerCase()
13077
13178- name : Build and push
132- uses: docker/build-push-action@v6
79+ uses : docker/build-push-action@v7
13380 with :
134- context: .
13581 push : true
13682 tags : ${{ steps.repo_slug.outputs.result }}:latest
13783` ` `
0 commit comments