Skip to content

Commit 5b288c9

Browse files
committed
feat: docker release workflow integration and branch setup
1 parent 111badf commit 5b288c9

4 files changed

Lines changed: 123 additions & 101 deletions

File tree

.github/workflows/cache-uv-build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
build-cache:
1414
runs-on: ubuntu-latest
1515
env:
16-
UV_VERSION: '0.9.27'
16+
UV_VERSION: '0.9.28'
1717
PYTHON_VERSION: '3.13'
1818

1919
steps:

.github/workflows/docker-build-and-scan.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,17 @@ jobs:
3737
ignore-unfixed: true
3838
vuln-type: 'os,library'
3939
severity: 'CRITICAL,HIGH'
40+
- name: Login to DockerHub
41+
if: github.event_name == 'workflow_call'
42+
uses: docker/login-action@v3
43+
with:
44+
username: ${{ secrets.DOCKERHUB_USERNAME }}
45+
password: ${{ secrets.DOCKERHUB_TOKEN }}
46+
- name: Push Docker image to DockerHub
47+
if: github.event_name == 'workflow_call'
48+
uses: docker/build-push-action@v6
49+
with:
50+
context: ${{ env.DOCKER_PATH_CONTEXT }}
51+
file: ${{ env.DOCKER_BUILD_DOCKERFILE }}
52+
push: true
53+
tags: ${{ env.DOCKER_TAGS }}

.github/workflows/release.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,12 @@ jobs:
7676
~/.local/share/uv
7777
.venv
7878
key: uv-main-${{ env.UV_VERSION }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('pyproject.toml', 'uv.lock') }}
79+
80+
docker-build-and-scan:
81+
needs: Semantic-Release
82+
uses: milsman2/python-app-template/.github/workflows/docker-build-and-scan.yaml@main
83+
with:
84+
DOCKER_PATH_CONTEXT: .
85+
DOCKER_BUILD_DOCKERFILE: Dockerfile
86+
DOCKER_LOAD_BOOL: true
87+
DOCKER_TAGS: sample-python-app:${{ needs.Semantic-Release.outputs.tag }}

0 commit comments

Comments
 (0)