File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
1722concurrency :
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
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 :
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments