diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 53e58147..eae3216a 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -5,10 +5,6 @@ FROM ghcr.io/astral-sh/uv:$UV_VERSION AS uv FROM mcr.microsoft.com/vscode/devcontainers/base:debian -LABEL maintainer="a5chin " -LABEL org.opencontainers.image.description="Dev Container for Python development with uv-based dependency management and environment configuration." -LABEL org.opencontainers.image.licenses=MIT -LABEL org.opencontainers.image.source=https://github.com/a5chin/python-uv ENV PYTHONDONTWRITEBYTECODE=True \ PYTHONUNBUFFERED=True \ diff --git a/.github/workflows/devcontainer.yml b/.github/workflows/devcontainer.yml index 712e69cc..aabf3f29 100644 --- a/.github/workflows/devcontainer.yml +++ b/.github/workflows/devcontainer.yml @@ -58,6 +58,7 @@ jobs: file: .devcontainer/Dockerfile push: false tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 0400906a..501eaf12 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -62,5 +62,6 @@ jobs: file: Dockerfile push: false tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max diff --git a/.github/workflows/publish-devcontainer.yml b/.github/workflows/publish-devcontainer.yml index 0be9f43b..8adb7d48 100644 --- a/.github/workflows/publish-devcontainer.yml +++ b/.github/workflows/publish-devcontainer.yml @@ -11,8 +11,8 @@ on: workflow_dispatch: env: - REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }}/devcontainer + REGISTRY: ghcr.io jobs: publish-devcontainer: @@ -36,6 +36,9 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Set current datetime as env variable + run: CURRENT_DATETIME=$(date --iso-8601=seconds) >> $GITHUB_ENV + - name: Extract metadata id: meta uses: docker/metadata-action@v5 @@ -45,6 +48,17 @@ jobs: type=ref,event=branch type=sha,prefix={{branch}}- type=raw,value=latest,enable={{is_default_branch}} + labels: | + maintainer=a5chin + org.opencontainers.image.created=${{ env.CURRENT_DATETIME }} + org.opencontainers.image.url=https://github.com/a5chin/python-uv + org.opencontainers.image.source=https://github.com/a5chin/python-uv + org.opencontainers.image.vendor=a5chin + org.opencontainers.image.title=python-uv + org.opencontainers.image.description=Dev Container for Python development with uv-based dependency management and environment configuration. + org.opencontainers.image.documentation=https://a5chin.github.io/python-uv/ + org.opencontainers.image.authors=a5chin + org.opencontainers.image.licenses=MIT - name: Build and push devcontainer image uses: docker/build-push-action@v6 diff --git a/Dockerfile b/Dockerfile index 90da29c9..2c2f7c12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,6 @@ FROM ghcr.io/astral-sh/uv:$UV_VERSION AS uv FROM python:$VARIANT-slim -LABEL maintainer="a5chin " WORKDIR /app