Skip to content

Commit 512f57d

Browse files
authored
ci(docker): add labels to docker image
1 parent dfac6ea commit 512f57d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/deploy_to_ghcr.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,9 @@ jobs:
2727

2828
- name: Build and Push Docker Image
2929
run: |
30-
docker build -t ghcr.io/${{ github.repository }}:latest .
31-
docker push ghcr.io/${{ github.repository }}:latest
30+
GITHUB_REPO="${GITHUB_REPO,,}" # convert repo name to lowercase as required by docker
31+
echo "building docker image in repository '$GITHUB_REPO' ..."
32+
docker build --label "org.opencontainers.image.title=copilot-metrics-viewer" --label "org.opencontainers.image.description=Metrics viewer for GitHub Copilot usage" --label "org.opencontainers.image.source=$GITHUB_REPO" -t ghcr.io/$GITHUB_REPO:latest .
33+
docker push ghcr.io/$GITHUB_REPO:latest
34+
env:
35+
GITHUB_REPO: ${{ github.repository }}

0 commit comments

Comments
 (0)