Skip to content

Commit

Permalink
feat(ci): allow custom docker context
Browse files Browse the repository at this point in the history
  • Loading branch information
MSevey committed May 30, 2024
1 parent 0e0fd06 commit 475e641
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/reusable_dockerfile_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ on:
required: false
type: string
description: "You can specify a different package name."
dockerContext:
required: false
type: string
description: "The docker context"
default: "."

env:
GITHUB_REG: ghcr.io
Expand Down Expand Up @@ -150,7 +155,7 @@ jobs:
OUTPUT_SHORT_SHA: ${{ needs.prepare-env.outputs.output_short_sha }}
OUTPUT_IMAGE_NAME: ${{ needs.prepare-env.outputs.output_image_name }}
with:
context: .
context: ${{ inputs.dockerContext}}
push: false
platforms: linux/amd64
# we're building the container before the scan, use the short sha tag
Expand Down Expand Up @@ -276,7 +281,7 @@ jobs:
OUTPUT_SHORT_SHA: ${{ needs.prepare-env.outputs.output_short_sha }}
OUTPUT_IMAGE_NAME: ${{ needs.prepare-env.outputs.output_image_name }}
with:
context: .
context: ${{ inputs.dockerContext}}
platforms: linux/arm64,linux/amd64
provenance: false
push: true
Expand All @@ -296,7 +301,7 @@ jobs:
OUTPUT_SHORT_SHA: ${{ needs.prepare-env.outputs.output_short_sha }}
OUTPUT_IMAGE_NAME: ${{ needs.prepare-env.outputs.output_image_name }}
with:
context: .
context: ${{ inputs.dockerContext}}
platforms: linux/amd64
provenance: false
# Only push if the head and base repos match, meaning it is not a fork
Expand Down

0 comments on commit 475e641

Please sign in to comment.