Skip to content

Commit

Permalink
ci: fix .taskcluster.yml for github-release events
Browse files Browse the repository at this point in the history
  • Loading branch information
ahal committed Sep 17, 2024
1 parent b32799d commit 04a6b34
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .taskcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,22 @@ tasks:
ownerEmail:
$switch:
'tasks_for == "github-push"': '${event.pusher.email}'
'tasks_for == "github-release"': '[email protected]'
'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:
Expand All @@ -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:
Expand Down

0 comments on commit 04a6b34

Please sign in to comment.