-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Publish q1-2024 tags to wire-builds (#4600)
- Loading branch information
Showing
1 changed file
with
24 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ on: | |
branches: [staging, main, release/*] | ||
tags: | ||
- v* | ||
- '*q1-2024*' | ||
|
||
jobs: | ||
test_build_deploy: | ||
|
@@ -20,7 +21,7 @@ jobs: | |
AWS_BUILD_ZIP_PATH: 'wire-account.zip' | ||
|
||
outputs: | ||
wire_builds_target_branches: ${{ steps.output_target_branches.outputs.wire_builds_target_branches }} | ||
wire_builds_target_branches: ${{ steps.output_target_branches.outputs.targets }} | ||
chart_version: ${{ steps.publish_helm_chart.outputs.chart_version }} | ||
image_tag: ${{ steps.push_docker_image.outputs.image_tag }} | ||
|
||
|
@@ -57,29 +58,30 @@ jobs: | |
if: contains(env.TITLE || env.COMMIT_MESSAGE, '[skip ci]') || contains(env.TITLE || env.COMMIT_MESSAGE, '[ci skip]') | ||
uses: andymckay/[email protected] | ||
|
||
# generates a mapping between branches/tag to wire-build branches | ||
- name: Define target branches in wireapp/wire-builds to bump | ||
uses: kanga333/variable-mapper@master | ||
id: output_target_branches | ||
shell: bash | ||
run: | | ||
# NOTE: make sure that wire_builds_target_branches is valid JSON | ||
wire_builds_target_branches='[]' | ||
version_tag="${TAG:-$BRANCH_NAME}" | ||
if [[ "$version_tag" == *"production"* ]]; then | ||
echo "FUTUREWORK: bump some production branch on wire-builds once it exists" | ||
fi | ||
if [ "$version_tag" == "staging" ]; then | ||
wire_builds_target_branches='["dev"]' | ||
fi | ||
if [ "$version_tag" == "release/q1-2024" ]; then | ||
wire_builds_target_branches='["q1-2024"]' | ||
fi | ||
echo "wire_builds_target_branches: $wire_builds_target_branches" | ||
echo "wire_builds_target_branches=$wire_builds_target_branches" >> $GITHUB_OUTPUT | ||
with: | ||
key: '${{github.ref}}' | ||
# TODO add production and staging once wire-builds has those branches | ||
# | ||
# "production": { | ||
# "targets": "[\"TDB\"]" | ||
# }, | ||
# "staging": { | ||
# "targets": "[\"TBD\"]" | ||
# }, | ||
map: | | ||
{ | ||
"dev": { | ||
"targets": "[\"dev\"]" | ||
}, | ||
"q1-2024": { | ||
"targets": "[\"q1-2024\"]" | ||
} | ||
} | ||
export_to: log,output | ||
|
||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
|