Skip to content

Commit 04fa14d

Browse files
committed
feat: update Docker workflow to include optional load boolean for image build
1 parent b29c79b commit 04fa14d

3 files changed

Lines changed: 6 additions & 11 deletions

File tree

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
DOCKER_TAGS:
1313
required: true
1414
type: string
15+
DOCKER_LOAD_BOOL:
16+
required: false
17+
type: boolean
18+
default: false
1519

1620
jobs:
1721
build-and-scan:
@@ -33,7 +37,7 @@ jobs:
3337
with:
3438
context: ${{ inputs.DOCKER_PATH_CONTEXT }}
3539
file: ${{ inputs.DOCKER_BUILD_DOCKERFILE}}
36-
load: ${{ github.event_name != 'workflow_call' }}
40+
load: ${{ inputs.DOCKER_LOAD_BOOL }}
3741
push: ${{ github.event_name == 'workflow_call' }}
3842
tags: ${{ inputs.DOCKER_TAGS }}
3943
- name: Run Trivy vulnerability scanner (remote)

.github/workflows/release.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,3 @@ 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-
secrets: inherit
84-
with:
85-
DOCKER_PATH_CONTEXT: .
86-
DOCKER_BUILD_DOCKERFILE: Dockerfile
87-
DOCKER_LOAD_BOOL: true
88-
DOCKER_TAGS: milsman2/sample-python-app:${{ needs.Semantic-Release.outputs.tag }}

.github/workflows/run-branch-scan.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ jobs:
1111
with:
1212
DOCKER_PATH_CONTEXT: .
1313
DOCKER_BUILD_DOCKERFILE: Dockerfile
14+
DOCKER_LOAD_BOOL: true
1415
DOCKER_TAGS: milsman2/sample-python-app:${{ github.sha }}

0 commit comments

Comments
 (0)