Skip to content

Commit 03e1775

Browse files
committed
Manually set docker image labels
Signed-off-by: Alireza Poodineh <[email protected]>
1 parent 916b51e commit 03e1775

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

.github/workflows/docker.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Create and publish EasyDev
33

44
# Configures this workflow to run every time a change is pushed to the branch called `release`.
55
on:
6+
workflow_dispatch:
7+
68
push:
79
paths:
810
- 'build/docker/**'
@@ -40,6 +42,17 @@ jobs:
4042
uses: docker/metadata-action@v5
4143
with:
4244
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
45+
labels: |
46+
org.opencontainers.image.title=EasyDev
47+
org.opencontainers.image.description=.NET Development Container
48+
org.opencontainers.image.vendor=SAPTeamDEV
49+
org.opencontainers.image.licenses=MIT
50+
tags: |
51+
# set latest tag for default branch
52+
type=raw,value=latest,enable={{is_default_branch}}
53+
type=ref,event=branch
54+
type=sha,priority=1000,prefix=,format=short
55+
4356
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
4457
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see [Usage](https://github.com/docker/build-push-action#usage) in the README of the `docker/build-push-action` repository.
4558
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.

build/docker/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:9.0
33

44
LABEL org.opencontainers.image.source https://github.com/SAPTeamDEV/EasySign
5+
LABEL org.opencontainers.image.title "EasyDev"
56
LABEL org.opencontainers.image.description ".NET Development Container"
7+
LABEL org.opencontainers.image.vendor "SAPTeamDEV"
68
LABEL org.opencontainers.image.licenses MIT
79

810
# Install additional apt packages

0 commit comments

Comments
 (0)