mirror of
https://github.com/Athou/commafeed.git
synced 2026-11-20 02:33:33 +00:00
generate OCI image labels with docker/metadata-action instead of hardcoding them in Dockerfiles
This commit is contained in:
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
@@ -147,6 +147,12 @@ jobs:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
|
||||
with:
|
||||
images: athou/commafeed
|
||||
|
||||
## build but don't push for PRs and renovate
|
||||
- name: Docker build - native
|
||||
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
|
||||
@@ -155,6 +161,7 @@ jobs:
|
||||
file: commafeed-server/src/main/docker/Dockerfile.native
|
||||
push: false
|
||||
platforms: linux/amd64,linux/arm64/v8
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
- name: Docker build - jvm
|
||||
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
|
||||
@@ -163,6 +170,7 @@ jobs:
|
||||
file: commafeed-server/src/main/docker/Dockerfile.jvm
|
||||
push: false
|
||||
platforms: linux/amd64,linux/arm64/v8
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
## build and push tag
|
||||
- name: Docker build and push tag - native
|
||||
@@ -173,6 +181,7 @@ jobs:
|
||||
file: commafeed-server/src/main/docker/Dockerfile.native
|
||||
push: ${{ env.DOCKERHUB_USERNAME != '' }}
|
||||
platforms: linux/amd64,linux/arm64/v8
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
tags: |
|
||||
athou/commafeed:latest-${{ matrix.database }}
|
||||
athou/commafeed:${{ github.ref_name }}-${{ matrix.database }}
|
||||
@@ -185,6 +194,7 @@ jobs:
|
||||
file: commafeed-server/src/main/docker/Dockerfile.jvm
|
||||
push: ${{ env.DOCKERHUB_USERNAME != '' }}
|
||||
platforms: linux/amd64,linux/arm64/v8
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
tags: |
|
||||
athou/commafeed:latest-${{ matrix.database }}-jvm
|
||||
athou/commafeed:${{ github.ref_name }}-${{ matrix.database }}-jvm
|
||||
@@ -198,6 +208,7 @@ jobs:
|
||||
file: commafeed-server/src/main/docker/Dockerfile.native
|
||||
push: ${{ env.DOCKERHUB_USERNAME != '' }}
|
||||
platforms: linux/amd64,linux/arm64/v8
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
tags: athou/commafeed:master-${{ matrix.database }}
|
||||
|
||||
- name: Docker build and push master - jvm
|
||||
@@ -208,6 +219,7 @@ jobs:
|
||||
file: commafeed-server/src/main/docker/Dockerfile.jvm
|
||||
push: ${{ env.DOCKERHUB_USERNAME != '' }}
|
||||
platforms: linux/amd64,linux/arm64/v8
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
tags: athou/commafeed:master-${{ matrix.database }}-jvm
|
||||
|
||||
release:
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
FROM ibm-semeru-runtimes:open-jdk-25.0.5.0-jre@sha256:b8fec7a8d2b3a8d50a4f070f169cf852f83208317036c38b86474d80eaf7becf
|
||||
LABEL org.opencontainers.image.source="https://github.com/Athou/commafeed"
|
||||
|
||||
EXPOSE 8082
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
FROM debian:13.7@sha256:9c6e381421d0f48d1b8133e573f33c185ee16cbf505eda9c4a8a4791b25ea8a6
|
||||
LABEL org.opencontainers.image.source="https://github.com/Athou/commafeed"
|
||||
|
||||
ARG TARGETARCH
|
||||
|
||||
|
||||
Reference in New Issue
Block a user