Skip to content

Commit a897556

Browse files
use branch name in image, temp image for now
1 parent c4aa998 commit a897556

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

.github/workflows/harness-image.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,21 @@ jobs:
4646
username: ${{ github.actor }}
4747
password: ${{ secrets.GITHUB_TOKEN }}
4848

49+
- name: Calculate branch tag
50+
id: vars
51+
shell: bash
52+
run: |
53+
BRANCH="${{ github.ref_name }}"
54+
CLEANED_BRANCH_NAME=$(echo "$BRANCH" | tr '/' '-' | tr '[:upper:]' '[:lower:]')
55+
echo "cleaned-branch-name=$CLEANED_BRANCH_NAME" >> "$GITHUB_OUTPUT"
56+
4957
- name: Docker metadata
5058
id: meta
5159
uses: docker/metadata-action@v5
5260
with:
5361
images: ghcr.io/conductor-oss/python-sdk/harness-worker
5462
tags: |
55-
type=raw,value=latest
63+
type=raw,value=${{ steps.vars.outputs.cleaned-branch-name }}-latest,enable=${{ github.event_name != 'release' }}
5664
type=raw,value=${{ github.event.release.tag_name }},enable=${{ github.event_name == 'release' }}
5765
5866
- name: Build and push
@@ -64,6 +72,12 @@ jobs:
6472
platforms: linux/amd64,linux/arm64
6573
push: true
6674
tags: ${{ steps.meta.outputs.tags }}
75+
# Registry-backed BuildKit cache. Unchanged layers are reused across
76+
# runs so rebuilding the same commit (or one with only minor diffs)
77+
# is near-instant. The `:buildcache` tag lives alongside the image
78+
# but only stores layer blobs, not a runnable image.
79+
cache-from: type=registry,ref=ghcr.io/conductor-oss/python-sdk/harness-worker:buildcache
80+
cache-to: type=registry,ref=ghcr.io/conductor-oss/python-sdk/harness-worker:buildcache,mode=max
6781

6882
dispatch-deploy:
6983
if: |

harness/manifests/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ spec:
1818
# note: imagePullSecrets is not needed for public images
1919
containers:
2020
- name: harness
21-
image: ghcr.io/conductor-oss/python-sdk/harness-worker:latest
21+
image: ghcr.io/conductor-oss/python-sdk/harness-worker:certification-worker-metrics-latest
2222
imagePullPolicy: Always
2323
env:
2424
# === CONDUCTOR CONNECTION (from per-cloud ConfigMap) ===

0 commit comments

Comments
 (0)