Skip to content

Commit

Permalink
chore: #66 Set org.opencontainers labels on container images
Browse files Browse the repository at this point in the history
Signed-off-by: Laurent Broudoux <[email protected]>
  • Loading branch information
lbroudoux committed Oct 11, 2024
1 parent 310212f commit 7865334
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/build-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,19 @@ on:
- '.gitignore'
- 'LICENSE'
- '*.md'

permissions: read-all
jobs:
build-verify-package:
runs-on: ubuntu-latest
environment: Build
steps:
- name: Get current date
id: date
#run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H:%M:%S')"
run: echo "date=$(date +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT

- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v2
Expand Down Expand Up @@ -67,4 +72,6 @@ jobs:
--provenance=false \
--build-arg TAG=$IMAGE_TAG \
--file build/Dockerfile \
--label "org.opencontainers.image.revision=${GITHUB_SHA}" \
--label "org.opencontainers.image.created=${{ steps.date.outputs.date }}" \
--tag=quay.io/microcks/microcks-cli:$IMAGE_TAG .
9 changes: 8 additions & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
# Build image
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.3-1475

MAINTAINER Laurent Broudoux <[email protected]>
# Some version information
LABEL maintainer="Laurent Broudoux <[email protected]>" \
org.opencontainers.image.authors="Laurent Broudoux <[email protected]>" \
org.opencontainers.image.title="Microcks CLI" \
org.opencontainers.image.description="Microcks is Open Source cloud-native native tool for API Mocking and Testing" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.documentation="https://github.com/microcks/microcks-cli" \
io.artifacthub.package.readme-url="https://raw.githubusercontent.com/microcks/microcks-cli/main/README.md"

ENV CLI=/usr/local/bin/microcks-cli \
USER_UID=1001 \
Expand Down

0 comments on commit 7865334

Please sign in to comment.