Skip to content

Commit

Permalink
ci: add input to disable container image build cache
Browse files Browse the repository at this point in the history
  • Loading branch information
basti1302 committed Jan 30, 2025
1 parent f574e98 commit 725589f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/actions/build-image/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ inputs:
imageUrl:
description: "URL for the sources of the image"
required: true
disableCache:
description: "add no_cache: true to the docker/build-push-action step"
required: false
default: 'false'
context:
description: "docker build context directory"
required: true
Expand Down Expand Up @@ -73,5 +77,6 @@ runs:
platforms: ${{ (github.ref == 'refs/heads/main' || contains(github.ref, 'refs/tags/')) && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
cache-from: type=gha,scope=${{ inputs.imageName }}
cache-to: type=gha,mode=max,scope=${{ inputs.imageName }}
no-cache: ${{ inputs.disableCache }}
# Maintenance note: keep the expression for push in sync with the expression used in "platforms".
push: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'refs/tags/') }}
11 changes: 11 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ on:
paths-ignore:
- '*.md'
workflow_dispatch:
inputs:
disableImageBuildCache:
description: "add no_cache: true to the docker/build-push-action steps"
type: boolean
required: false
default: false

concurrency:
# Branches and PR all run in their individual, separate concurrency groups (with cancel-in-progress: true). The main
Expand Down Expand Up @@ -229,6 +235,7 @@ jobs:
imageTitle: Dash0 Kubernetes Operator Controller
imageDescription: the controller for the Dash0 operator for Kubernetes
imageUrl: https://github.com/dash0hq/dash0-operator/tree/main
disableCache: ${{ inputs.disableImageBuildCache }}
context: .

- name: build instrumentation image
Expand All @@ -239,6 +246,7 @@ jobs:
imageTitle: Dash0 Instrumentation
imageDescription: contains Dash0 OpenTelemetry distributions for multiple runtimes
imageUrl: https://github.com/dash0hq/dash0-operator/tree/main/images/instrumentation
disableCache: ${{ inputs.disableImageBuildCache }}
context: images/instrumentation

- name: build collector image
Expand All @@ -249,6 +257,7 @@ jobs:
imageTitle: Dash0 Kubernetes Collector
imageDescription: the OpenTelemetry collector for the Dash0 operator for Kubernetes
imageUrl: https://github.com/dash0hq/dash0-operator/tree/main/images/collector
disableCache: ${{ inputs.disableImageBuildCache }}
context: images/collector

- name: build configuration reloader image
Expand All @@ -259,6 +268,7 @@ jobs:
imageTitle: Dash0 Kubernetes Configuration Reloader
imageDescription: the configuration reloader for the Dash0 operator for Kubernetes
imageUrl: https://github.com/dash0hq/dash0-operator/tree/main/images/configreloader
disableCache: ${{ inputs.disableImageBuildCache }}
context: images
file: images/configreloader/Dockerfile

Expand All @@ -270,6 +280,7 @@ jobs:
imageTitle: Dash0 Kubernetes Filelog Offset Synch
imageDescription: the filelog offset synch for the Dash0 operator for Kubernetes
imageUrl: https://github.com/dash0hq/dash0-operator/tree/main
disableCache: ${{ inputs.disableImageBuildCache }}
context: images
file: images/filelogoffsetsynch/Dockerfile

Expand Down

0 comments on commit 725589f

Please sign in to comment.