From fb5ddbc58358697b22aebbf16640d63e118511b8 Mon Sep 17 00:00:00 2001 From: d-eigo-hara Date: Thu, 25 Dec 2025 16:39:13 +0900 Subject: [PATCH 1/6] add: publish app image --- .github/workflows/publish-app.yml | 72 +++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/publish-app.yml diff --git a/.github/workflows/publish-app.yml b/.github/workflows/publish-app.yml new file mode 100644 index 0000000..058fca1 --- /dev/null +++ b/.github/workflows/publish-app.yml @@ -0,0 +1,72 @@ +name: Publish Devcontainer to GHCR + +on: + push: + branches: [main] + tags: + - "v*" + paths: + - ".github/workflows/publish-app.yml" + - ".python-version" + - "Dockerfile" + + workflow_dispatch: + +env: + IMAGE_NAME: ${{ github.repository }}/app + REGISTRY: ghcr.io + +jobs: + publish-devcontainer: + runs-on: ubuntu-latest + + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=ref,event=branch + type=semver,pattern={{version}} + type=sha,prefix={{branch}}- + type=raw,value=latest,enable={{is_default_branch}} + labels: | + maintainer=a5chin + 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 + with: + context: . + file: Dockerfile + push: true + provenance: false + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max From 104cb7d535838425a5bc9d13527138d60579e252 Mon Sep 17 00:00:00 2001 From: d-eigo-hara Date: Thu, 25 Dec 2025 16:40:25 +0900 Subject: [PATCH 2/6] release-drafter.yml release.yml --- .github/workflows/{release-drafter.yml => release.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{release-drafter.yml => release.yml} (100%) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release.yml similarity index 100% rename from .github/workflows/release-drafter.yml rename to .github/workflows/release.yml From c87388fcf783a24f17a5ab7ae076239ef2610459 Mon Sep 17 00:00:00 2001 From: d-eigo-hara Date: Thu, 25 Dec 2025 17:07:32 +0900 Subject: [PATCH 3/6] fix: release action --- .github/workflows/release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 097942f..561d037 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Create Release 🚀 +name: Release on: pull_request: @@ -7,8 +7,7 @@ on: - main jobs: - create-release: - name: Create Release + publish: if: github.event.pull_request.merged == true && contains(github.head_ref, 'release/') runs-on: ubuntu-latest @@ -21,11 +20,12 @@ jobs: - name: Checkout uses: actions/checkout@v6 - - uses: release-drafter/release-drafter@v6 + - name: Publish Release + uses: release-drafter/release-drafter@v6 with: config-name: release-drafter.yml disable-autolabeler: true - name: Release ${{ env.VERSION }} + name: ${{ env.VERSION }} publish: true tag: ${{ env.VERSION }} version: ${{ env.VERSION }} From 26d2c5d1fd4d83370d3326918b6937d4fd8188ed Mon Sep 17 00:00:00 2001 From: d-eigo-hara Date: Thu, 25 Dec 2025 17:07:48 +0900 Subject: [PATCH 4/6] add: draft --- .github/workflows/draft.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/draft.yml diff --git a/.github/workflows/draft.yml b/.github/workflows/draft.yml new file mode 100644 index 0000000..7e313d1 --- /dev/null +++ b/.github/workflows/draft.yml @@ -0,0 +1,22 @@ +name: Draft Release + +on: + pull_request: + types: [closed] + branches: + - main + +jobs: + update: + if: github.event.pull_request.merged == true && !contains(github.head_ref, 'release/') + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Update Draft Release + uses: release-drafter/release-drafter@v6 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From c5366f3162ca947417625e97e7d61440c92aad8e Mon Sep 17 00:00:00 2001 From: a5chin <81167661+a5chin@users.noreply.github.com> Date: Thu, 25 Dec 2025 21:30:30 +0900 Subject: [PATCH 5/6] Update .github/workflows/publish-app.yml Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/workflows/publish-app.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-app.yml b/.github/workflows/publish-app.yml index 058fca1..b618986 100644 --- a/.github/workflows/publish-app.yml +++ b/.github/workflows/publish-app.yml @@ -50,8 +50,8 @@ jobs: type=raw,value=latest,enable={{is_default_branch}} labels: | maintainer=a5chin - org.opencontainers.image.url=https://github.com/a5chin/python-uv - org.opencontainers.image.source=https://github.com/a5chin/python-uv + org.opencontainers.image.url=https://github.com/${{ github.repository }} + org.opencontainers.image.source=https://github.com/${{ github.repository }} 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. From dd77f131310e1647a469ab90e2ab776b79433443 Mon Sep 17 00:00:00 2001 From: d-eigo-hara Date: Thu, 25 Dec 2025 21:40:43 +0900 Subject: [PATCH 6/6] fix: chore --- .github/workflows/publish-app.yml | 14 +++++++------- .github/workflows/publish-devcontainer.yml | 18 ++++++++++-------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/publish-app.yml b/.github/workflows/publish-app.yml index b618986..7ce5a7d 100644 --- a/.github/workflows/publish-app.yml +++ b/.github/workflows/publish-app.yml @@ -1,4 +1,4 @@ -name: Publish Devcontainer to GHCR +name: Publish App to GHCR on: push: @@ -17,7 +17,7 @@ env: REGISTRY: ghcr.io jobs: - publish-devcontainer: + publish: runs-on: ubuntu-latest permissions: @@ -25,10 +25,10 @@ jobs: packages: write steps: - - name: Checkout repository + - name: Checkout Repository uses: actions/checkout@v6 - - name: Set up Docker Buildx + - name: Setup Docker Buildx uses: docker/setup-buildx-action@v3 - name: Log in to Container Registry @@ -38,7 +38,7 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata + - name: Extract Metadata id: meta uses: docker/metadata-action@v5 with: @@ -54,12 +54,12 @@ jobs: org.opencontainers.image.source=https://github.com/${{ github.repository }} 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.description=App 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 + - name: Build and Push App Image uses: docker/build-push-action@v6 with: context: . diff --git a/.github/workflows/publish-devcontainer.yml b/.github/workflows/publish-devcontainer.yml index a6957e4..c088e73 100644 --- a/.github/workflows/publish-devcontainer.yml +++ b/.github/workflows/publish-devcontainer.yml @@ -3,6 +3,8 @@ name: Publish Devcontainer to GHCR on: push: branches: [main] + tags: + - "v*" paths: - ".devcontainer/Dockerfile" - ".github/workflows/publish-devcontainer.yml" @@ -15,7 +17,7 @@ env: REGISTRY: ghcr.io jobs: - publish-devcontainer: + publish: runs-on: ubuntu-latest permissions: @@ -23,20 +25,20 @@ jobs: packages: write steps: - - name: Checkout repository + - name: Checkout Repository uses: actions/checkout@v6 - - name: Set up Docker Buildx + - name: Setup Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Log in to Container Registry + - name: Login to Container Registry uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata + - name: Extract Metadata id: meta uses: docker/metadata-action@v5 with: @@ -48,8 +50,8 @@ jobs: type=raw,value=latest,enable={{is_default_branch}} labels: | maintainer=a5chin - org.opencontainers.image.url=https://github.com/a5chin/python-uv - org.opencontainers.image.source=https://github.com/a5chin/python-uv + org.opencontainers.image.url=https://github.com/${{ github.repository }} + org.opencontainers.image.source=https://github.com/${{ github.repository }} 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. @@ -57,7 +59,7 @@ jobs: org.opencontainers.image.authors=a5chin org.opencontainers.image.licenses=MIT - - name: Build and push devcontainer image + - name: Build and Push Devcontainer Image uses: docker/build-push-action@v6 with: context: .