diff --git a/.tekton/fms-hf-tuning-pull-request.yaml b/.tekton/fms-hf-tuning-pull-request.yaml index 0e143b324..1fe4cae71 100644 --- a/.tekton/fms-hf-tuning-pull-request.yaml +++ b/.tekton/fms-hf-tuning-pull-request.yaml @@ -7,8 +7,10 @@ metadata: build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}' build.appstudio.redhat.com/target_branch: '{{target_branch}}' pipelinesascode.tekton.dev/max-keep-runs: "3" - pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch - == "main" + pipelinesascode.tekton.dev/on-cel-expression: | + event == "pull_request" + && target_branch == "main" + && ( !".tekton/**".pathChanged() || ".tekton/fms-hf-tuning-pull-request.yaml".pathChanged() ) creationTimestamp: null labels: appstudio.openshift.io/application: fms-hf-tuning diff --git a/.tekton/fms-hf-tuning-push.yaml b/.tekton/fms-hf-tuning-push.yaml index 04bdd01e6..b72f3545b 100644 --- a/.tekton/fms-hf-tuning-push.yaml +++ b/.tekton/fms-hf-tuning-push.yaml @@ -6,8 +6,10 @@ metadata: build.appstudio.redhat.com/commit_sha: '{{revision}}' build.appstudio.redhat.com/target_branch: '{{target_branch}}' pipelinesascode.tekton.dev/max-keep-runs: "3" - pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch - == "main" + pipelinesascode.tekton.dev/on-cel-expression: | + event == "push" + && target_branch == "main" + && (!".tekton/**".pathChanged() || ".tekton/fms-hf-tuning-push.yaml".pathChanged()) creationTimestamp: null labels: appstudio.openshift.io/application: fms-hf-tuning @@ -22,7 +24,7 @@ spec: - name: git-url value: '{{source_url}}' - name: output-image - value: quay.io/modh/fms-hf-tuning:{{revision}} + value: quay.io/modh/fms-hf-tuning:{{target_branch}} - name: path-context value: . - name: revision @@ -404,6 +406,9 @@ spec: params: - name: IMAGE value: $(tasks.build-container.results.IMAGE_URL) + - name: ADDITIONAL_TAGS + value: + - '{{target_branch}}-{{revision}}' runAfter: - build-container taskRef: