Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/draft.yml
Original file line number Diff line number Diff line change
@@ -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 }}
72 changes: 72 additions & 0 deletions .github/workflows/publish-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Publish App 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:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout Repository
uses: actions/checkout@v6

- name: Setup 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 <[email protected]>
org.opencontainers.image.url=https://github.com/${{ github.repository }}
org.opencontainers.image.source=https://github.com/${{ github.repository }}
org.opencontainers.image.vendor=a5chin <[email protected]>
org.opencontainers.image.title=python-uv
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 <[email protected]>
org.opencontainers.image.licenses=MIT

- name: Build and Push App 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
18 changes: 10 additions & 8 deletions .github/workflows/publish-devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Publish Devcontainer to GHCR
on:
push:
branches: [main]
tags:
- "v*"
paths:
- ".devcontainer/Dockerfile"
- ".github/workflows/publish-devcontainer.yml"
Expand All @@ -15,28 +17,28 @@ env:
REGISTRY: ghcr.io

jobs:
publish-devcontainer:
publish:
runs-on: ubuntu-latest

permissions:
contents: read
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:
Expand All @@ -48,16 +50,16 @@ jobs:
type=raw,value=latest,enable={{is_default_branch}}
labels: |
maintainer=a5chin <[email protected]>
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 <[email protected]>
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 <[email protected]>
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: .
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create Release 🚀
name: Release

on:
pull_request:
Expand All @@ -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
Expand All @@ -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 }}
Expand Down
Loading