From af4b64bcf1e9252f81d78c13bd4e425f22886aa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Rodr=C3=ADguez-Guerra?= Date: Thu, 3 Nov 2022 23:32:26 +0100 Subject: [PATCH 1/3] only enable push events to chosen branch(es) when `upload_on_branch` is enabled --- conda_smithy/templates/github-actions.tmpl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/conda_smithy/templates/github-actions.tmpl b/conda_smithy/templates/github-actions.tmpl index 951a8fc45..71c739c88 100644 --- a/conda_smithy/templates/github-actions.tmpl +++ b/conda_smithy/templates/github-actions.tmpl @@ -14,7 +14,13 @@ name: Build conda package {%- if github_actions.self_hosted %} on: [push] {%- else %} -on: [push, pull_request] +on: + push: +{%- if upload_on_branch %} + branches: + - {{ upload_on_branch }} +{%- endif %} + pull_request: {%- endif %} jobs: From 61efaeee5a3f2583eb4daf3317be9e2c6a722fff Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Tue, 7 Nov 2023 10:07:47 -0600 Subject: [PATCH 2/3] fix spacing --- conda_smithy/templates/github-actions.yml.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda_smithy/templates/github-actions.yml.tmpl b/conda_smithy/templates/github-actions.yml.tmpl index 1c840c698..0bf0566a4 100644 --- a/conda_smithy/templates/github-actions.yml.tmpl +++ b/conda_smithy/templates/github-actions.yml.tmpl @@ -20,7 +20,7 @@ on: {%- else %} {{ trigger }}: {%- endif %} -{%- endfor %} +{% endfor %} {%- if github_actions.cancel_in_progress %} concurrency: From 5beab45ed2fd34a447db9a4043b13816cfcdf989 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Tue, 7 Nov 2023 10:08:39 -0600 Subject: [PATCH 3/3] add news --- news/upload_gha.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 news/upload_gha.rst diff --git a/news/upload_gha.rst b/news/upload_gha.rst new file mode 100644 index 000000000..2caa45a55 --- /dev/null +++ b/news/upload_gha.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* When upload_on_branch is set, GHA is triggered only for that branch (#1687). + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +*