Skip to content

Commit

Permalink
chore: Publish q1-2024 tags to wire-builds (#4600)
Browse files Browse the repository at this point in the history
  • Loading branch information
atomrc authored Mar 7, 2024
1 parent 7fce107 commit 4ccf8f7
Showing 1 changed file with 24 additions and 22 deletions.
46 changes: 24 additions & 22 deletions .github/workflows/test_build_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [staging, main, release/*]
tags:
- v*
- '*q1-2024*'

jobs:
test_build_deploy:
Expand All @@ -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 }}

Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 4ccf8f7

Please sign in to comment.