Skip to content

Commit c7c4519

Browse files
committed
Simplify docker image generation
Signed-off-by: Joachim Wiberg <[email protected]>
1 parent ba7ef4d commit c7c4519

File tree

2 files changed

+7
-20
lines changed

2 files changed

+7
-20
lines changed

.github/workflows/container.yml

+2-20
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,10 @@ jobs:
2929
- uses: docker/metadata-action@v4
3030
id: meta
3131
with:
32-
images: |
33-
${{ github.repository }}
34-
ghcr.io/${{ github.repository }}
35-
tags: |
36-
type=semver,pattern={{version}}
37-
type=edge
3832
labels: |
39-
org.opencontainers.image.title=Mg
40-
org.opencontainers.image.description=Micro Emacs text editor from OpenBSD
41-
org.opencontainers.image.url=https://github.com/troglobit/mg
42-
org.opencontainers.image.documentation=https://man.troglobit.com/man1/mg.1.html
4333
org.opencontainers.image.source=https://github.com/troglobit/mg/tree/${{ github.sha }}/
4434
- uses: docker/setup-qemu-action@v2
4535
- uses: docker/setup-buildx-action@v2
46-
- name: Log in to GHCR
47-
uses: docker/login-action@v2
48-
with:
49-
registry: ghcr.io
50-
username: ${{ github.repository_owner }}
51-
password: ${{ secrets.GITHUB_TOKEN }}
5236
- name: Log in to Docker Hub
5337
uses: docker/login-action@v2
5438
with:
@@ -57,8 +41,6 @@ jobs:
5741
- uses: docker/build-push-action@v4
5842
id: build
5943
with:
60-
build-args: |
61-
DOCKER_METADATA_OUTPUT_JSON
6244
context: .
6345
labels: ${{ steps.meta.outputs.labels }}
6446
platforms: ${{ matrix.platform }}
@@ -69,10 +51,10 @@ jobs:
6951
push-by-digest=true,
7052
push=true,
7153
annotation-manifest-descriptor.org.opencontainers.image.title=Mg,
72-
annotation-manifest-descriptor.org.opencontainers.image.description=Micro Emacs text editor for ${{ matrix.platform }},
54+
annotation-manifest-descriptor.org.opencontainers.image.description=Micro Emacs text editor,
7355
annotation-manifest-descriptor.org.opencontainers.image.url=https://github.com/troglobit/mg,
7456
annotation-manifest-descriptor.org.opencontainers.image.licenses=Unlicense,
75-
annotation-manifest-descriptor.org.opencontainers.image.revision=${GITHUB_SHA}
57+
annotation-manifest-descriptor.org.opencontainers.image.revision=${{ github.sha }}
7658
- name: Export digest
7759
run: |
7860
mkdir -p /tmp/digests

Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ RUN ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var CFLAGS=-sta
1818
RUN make install-strip
1919

2020
FROM scratch
21+
LABEL org.opencontainers.image.title "Mg"
22+
LABEL org.opencontainers.image.description "Micro Emacs text editor from OpenBSD"
23+
LABEL org.opencontainers.image.documentation "https://man.troglobit.com/man1/mg.1.html"
24+
LABEL org.opencontainers.image.url "https://github.com/troglobit/mg"
25+
LABEL org.opencontainers.image.licenses "Unlicense"
2126

2227
COPY --from=0 /usr/bin/mg /usr/bin/mg
2328
COPY --from=0 /usr/share/doc/mg /usr/share/doc/mg

0 commit comments

Comments
 (0)