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
5 changes: 3 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"charliermarsh.ruff",
"GitHub.copilot-chat"
"GitHub.copilot-chat",
"ms-python.mypy-type-checker",
"ms-python.python"
]
}
},
Expand Down
60 changes: 14 additions & 46 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,51 +1,19 @@
# Ignore node_modules and other dependency directories
node_modules
bower_components
vendor

# Ignore logs and temporary files
*.log
*.tmp
*.swp

# Ignore .env files and other environment files
.env
.env.*
*.local

# Ignore git-related files
.git
.gitignore

# Ignore Docker-related files and configs
.dockerignore
docker-compose.yml

# Ignore build and cache directories
dist
build
.cache
__pycache__

# Ignore IDE and editor configurations
.vscode
.idea
*.sublime-project
*.sublime-workspace
.DS_Store # macOS-specific

# Ignore test and coverage files
coverage
*.coverage
*.test.js
*.spec.js
tests

# Misc
.github
.venv
*.pyc
.devcontainer
.pre-commit-config.yaml
.coverage
.pytest_cache
.ruff_cache
.mypy_cache
dist
site
notebooks
tests
docs
.devcontainer
.vscode
*.egg-info
__pycache__
*.py[cod]
.env
.env.*
14 changes: 2 additions & 12 deletions .github/workflows/azure-static-web-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,7 @@ permissions:
contents: read
jobs:
deploy:
strategy:
matrix:
platform:
- "ubuntu-latest"
python-version:
- "3.13"
runs-on: ${{ matrix.platform }}
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand All @@ -26,11 +20,7 @@ jobs:
with:
enable-cache: true
version: "0.12.19"
python-version: ${{ matrix.python-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
python-version: "3.13"
- name: Generate documentation
shell: bash
run: |
Expand Down
118 changes: 118 additions & 0 deletions .github/workflows/container-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: container-release

on:
push:
tags:
- "v*"

permissions:
contents: read

jobs:
verify:
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Verify package version matches tag
id: version
shell: bash
env:
RELEASE_TAG: ${{ github.ref_name }}
run: |
version=$(python -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')
test "v${version}" = "$RELEASE_TAG"
echo "version=${version}" >> "$GITHUB_OUTPUT"

docker-hub:
needs: verify
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
- name: Log in to Docker Hub
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Generate image metadata
id: meta
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
with:
images: ${{ secrets.DOCKERHUB_USERNAME }}/template-python
flavor: latest=auto
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
- name: Build and push
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
build-args: |
GIT_REVISION=${{ github.sha }}
GIT_TAG=${{ needs.verify.outputs.version }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
provenance: mode=max
sbom: true

ghcr:
needs: verify
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
attestations: write
contents: read
id-token: write
packages: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
- name: Log in to GHCR
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate image metadata
id: meta
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
with:
images: ghcr.io/${{ github.repository_owner }}/template-python
flavor: latest=auto
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
- name: Build and push
id: push
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
build-args: |
GIT_REVISION=${{ github.sha }}
GIT_TAG=${{ needs.verify.outputs.version }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
provenance: mode=max
sbom: true
- name: Attest image provenance
uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 # v4
with:
subject-name: ghcr.io/${{ github.repository_owner }}/template-python
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
48 changes: 0 additions & 48 deletions .github/workflows/docker-release.yaml

This file was deleted.

5 changes: 4 additions & 1 deletion .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ on:
- "main"
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
docker:
runs-on: "ubuntu-latest"
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down
52 changes: 0 additions & 52 deletions .github/workflows/ghcr-release.yaml

This file was deleted.

Loading
Loading