From 46e4299c4b7a103c7014c258b3892df94c6ed2db Mon Sep 17 00:00:00 2001 From: Andrew Halberstadt Date: Mon, 16 Sep 2024 16:14:08 -0400 Subject: [PATCH] ci: fix .taskcluster.yml for github-release events --- .taskcluster.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.taskcluster.yml b/.taskcluster.yml index 3e43aff..a5fa349 100644 --- a/.taskcluster.yml +++ b/.taskcluster.yml @@ -14,21 +14,22 @@ tasks: ownerEmail: $switch: 'tasks_for == "github-push"': '${event.pusher.email}' + 'tasks_for == "github-release"': 'release+simple-github-ci@mozilla.com' 'tasks_for[:19] == "github-pull-request"': '${event.pull_request.user.login}@users.noreply.github.com' 'tasks_for in ["cron", "action"]': '${tasks_for}@noreply.mozilla.org' baseRepoUrl: $switch: - 'tasks_for == "github-push"': '${event.repository.html_url}' 'tasks_for[:19] == "github-pull-request"': '${event.pull_request.base.repo.html_url}' 'tasks_for in ["cron", "action"]': '${repository.url}' + $default: '${event.repository.html_url}' repoUrl: $switch: - 'tasks_for == "github-push"': '${event.repository.html_url}' 'tasks_for[:19] == "github-pull-request"': '${event.pull_request.head.repo.html_url}' 'tasks_for in ["cron", "action"]': '${repository.url}' + $default: '${event.repository.html_url}' project: $switch: - 'tasks_for == "github-push"': '${event.repository.name}' + 'tasks_for in ["github-push", "github-release"]': '${event.repository.name}' 'tasks_for[:19] == "github-pull-request"': '${event.pull_request.head.repo.name}' 'tasks_for in ["cron", "action"]': '${repository.project}' head_branch: @@ -41,21 +42,24 @@ tasks: $switch: 'tasks_for[:19] == "github-pull-request"': ${event.pull_request.base.ref} 'tasks_for == "github-push" && event.base_ref': ${event.base_ref} - 'tasks_for == "github-push"': '' + 'tasks_for in ["github-push", "github-release"]': '' 'tasks_for in ["cron", "action"]': '${push.branch}' head_ref: $switch: 'tasks_for[:19] == "github-pull-request"': ${event.pull_request.head.ref} 'tasks_for == "github-push"': ${event.ref} 'tasks_for in ["cron", "action"]': '${push.branch}' + 'tasks_for == "github-release"': ${event.release.tag_name} base_sha: $switch: 'tasks_for == "github-push"': '${event.before}' + 'tasks_for == "github-release"': '${event.release.target_commitish}' 'tasks_for[:19] == "github-pull-request"': '${event.pull_request.base.sha}' 'tasks_for in ["cron", "action"]': '${push.revision}' head_sha: $switch: 'tasks_for == "github-push"': '${event.after}' + 'tasks_for == "github-release"': '${event.release.tag_name}' 'tasks_for[:19] == "github-pull-request"': '${event.pull_request.head.sha}' 'tasks_for in ["cron", "action"]': '${push.revision}' ownTaskId: