Skip to content

Commit 3a5969b

Browse files
adjust harness image name
1 parent 7a2ed18 commit 3a5969b

2 files changed

Lines changed: 18 additions & 3 deletions

File tree

.github/workflows/harness-image.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ on:
1313
release:
1414
types: [published]
1515
workflow_dispatch:
16+
inputs:
17+
deploy:
18+
description: "Dispatch downstream deploy after the image is built"
19+
type: boolean
20+
default: true
1621

1722
concurrency:
1823
group: ${{ github.workflow }}-${{ github.ref }}
@@ -41,13 +46,21 @@ jobs:
4146
username: ${{ github.actor }}
4247
password: ${{ secrets.GITHUB_TOKEN }}
4348

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+
4457
- name: Docker metadata
4558
id: meta
4659
uses: docker/metadata-action@v5
4760
with:
4861
images: ghcr.io/conductor-oss/javascript-sdk/harness-worker
4962
tags: |
50-
type=raw,value=latest
63+
type=raw,value=${{ steps.vars.outputs.cleaned-branch-name }}-latest,enable=${{ github.event_name != 'release' }}
5164
type=raw,value=${{ github.event.release.tag_name }},enable=${{ github.event_name == 'release' }}
5265
5366
- name: Build and push
@@ -61,7 +74,9 @@ jobs:
6174
tags: ${{ steps.meta.outputs.tags }}
6275

6376
dispatch-deploy:
64-
if: github.event_name == 'release'
77+
if: |
78+
github.event_name == 'release' ||
79+
(github.event_name == 'workflow_dispatch' && inputs.deploy)
6580
needs: build-and-push
6681
runs-on: ubuntu-latest
6782
permissions:

harness/manifests/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spec:
1616
spec:
1717
containers:
1818
- name: harness
19-
image: ghcr.io/conductor-oss/javascript-sdk/harness-worker:latest
19+
image: ghcr.io/conductor-oss/javascript-sdk/harness-worker:certification-worker-metrics-latest
2020
imagePullPolicy: Always
2121
env:
2222
- name: CONDUCTOR_SERVER_URL

0 commit comments

Comments
 (0)