Skip to content

Commit eb65127

Browse files
authored
Merge pull request #1480 from crazy-max/update-readme
readme: update to v7
2 parents 1031bc4 + 155e77a commit eb65127

File tree

2 files changed

+15
-69
lines changed

2 files changed

+15
-69
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,19 @@ jobs:
6262
steps:
6363
-
6464
name: Login to Docker Hub
65-
uses: docker/login-action@v3
65+
uses: docker/login-action@v4
6666
with:
6767
username: ${{ vars.DOCKERHUB_USERNAME }}
6868
password: ${{ secrets.DOCKERHUB_TOKEN }}
6969
-
7070
name: Set up QEMU
71-
uses: docker/setup-qemu-action@v3
71+
uses: docker/setup-qemu-action@v4
7272
-
7373
name: Set up Docker Buildx
74-
uses: docker/setup-buildx-action@v3
74+
uses: docker/setup-buildx-action@v4
7575
-
7676
name: Build and push
77-
uses: docker/build-push-action@v6
77+
uses: docker/build-push-action@v7
7878
with:
7979
push: true
8080
tags: user/app:latest
@@ -94,7 +94,7 @@ to the default Git context:
9494
```yaml
9595
-
9696
name: Build and push
97-
uses: docker/build-push-action@v6
97+
uses: docker/build-push-action@v7
9898
with:
9999
context: "{{defaultContext}}:mysubdir"
100100
push: true
@@ -109,7 +109,7 @@ named `GIT_AUTH_TOKEN` to be able to authenticate against it with Buildx:
109109
```yaml
110110
-
111111
name: Build and push
112-
uses: docker/build-push-action@v6
112+
uses: docker/build-push-action@v7
113113
with:
114114
push: true
115115
tags: user/app:latest
@@ -131,22 +131,22 @@ jobs:
131131
steps:
132132
-
133133
name: Checkout
134-
uses: actions/checkout@v5
134+
uses: actions/checkout@v6
135135
-
136136
name: Login to Docker Hub
137-
uses: docker/login-action@v3
137+
uses: docker/login-action@v4
138138
with:
139139
username: ${{ vars.DOCKERHUB_USERNAME }}
140140
password: ${{ secrets.DOCKERHUB_TOKEN }}
141141
-
142142
name: Set up QEMU
143-
uses: docker/setup-qemu-action@v3
143+
uses: docker/setup-qemu-action@v4
144144
-
145145
name: Set up Docker Buildx
146-
uses: docker/setup-buildx-action@v3
146+
uses: docker/setup-buildx-action@v4
147147
-
148148
name: Build and push
149-
uses: docker/build-push-action@v6
149+
uses: docker/build-push-action@v7
150150
with:
151151
context: .
152152
push: true

TROUBLESHOOTING.md

Lines changed: 4 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
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
2119
you're pushing your image. The quality of error message depends on the registry
2220
and are usually not very informative.
2321

24-
### BuildKit container logs
25-
2622
To help you solve this, you have to [enable debugging in the setup-buildx](https://github.com/docker/setup-buildx-action#buildkit-container-logs)
2723
action 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

7927
You 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

Comments
 (0)