From 16c41b823b2abb3b40296283de61a135f5e51a9a Mon Sep 17 00:00:00 2001 From: Joseph Flinn <58369717+joseph-flinn@users.noreply.github.com> Date: Tue, 16 Aug 2022 08:55:57 -0700 Subject: [PATCH] [workflows] Decouple hotfix-rc branches (#3298) --- .github/workflows/build-browser.yml | 4 ++-- .github/workflows/build-cli.yml | 2 +- .github/workflows/build-desktop.yml | 22 +++++++++++----------- .github/workflows/build-web.yml | 16 ++++++++-------- .github/workflows/release-browser.yml | 4 ++-- .github/workflows/release-cli.yml | 4 ++-- .github/workflows/release-desktop.yml | 4 ++-- .github/workflows/release-web.yml | 4 ++-- 8 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build-browser.yml b/.github/workflows/build-browser.yml index a1229db88a5..77303768f7a 100644 --- a/.github/workflows/build-browser.yml +++ b/.github/workflows/build-browser.yml @@ -16,7 +16,7 @@ on: branches: - 'master' - 'rc' - - 'hotfix-rc' + - 'hotfix-rc-browser' paths: - 'apps/browser/**' - 'libs/**' @@ -347,7 +347,7 @@ jobs: trigger-desktop-build: name: Trigger desktop build - if: ${{ (github.ref == 'refs/heads/master') || (github.ref == 'refs/heads/rc') || github.ref != 'refs/heads/hotfix-rc' }} + if: ${{ (github.ref == 'refs/heads/master') || (github.ref == 'refs/heads/rc') || github.ref != 'refs/heads/hotfix-rc-browser' }} runs-on: ubuntu-20.04 needs: - build diff --git a/.github/workflows/build-cli.yml b/.github/workflows/build-cli.yml index 7a355f997a3..96ccea4ef86 100644 --- a/.github/workflows/build-cli.yml +++ b/.github/workflows/build-cli.yml @@ -17,7 +17,7 @@ on: branches: - 'master' - 'rc' - - 'hotfix-rc' + - 'hotfix-rc-cli' paths: - 'apps/cli/**' - 'libs/**' diff --git a/.github/workflows/build-desktop.yml b/.github/workflows/build-desktop.yml index 78a7c5f79da..16579580b55 100644 --- a/.github/workflows/build-desktop.yml +++ b/.github/workflows/build-desktop.yml @@ -16,7 +16,7 @@ on: branches: - 'master' - 'rc' - - 'hotfix-rc' + - 'hotfix-rc-desktop' paths: - 'apps/desktop/**' - 'libs/**' @@ -121,7 +121,7 @@ jobs: echo "::set-output name=rc_branch_exists::0" fi - if [[ $(git ls-remote --heads origin hotfix-rc) ]]; then + if [[ $(git ls-remote --heads origin hotfix-rc-desktop) ]]; then echo "::set-output name=hotfix_branch_exists::1" else echo "::set-output name=hotfix_branch_exists::0" @@ -744,13 +744,13 @@ jobs: if: steps.build-cache.outputs.cache-hit != 'true' run: npm run build - - name: Download artifact from hotfix-rc - if: github.ref == 'refs/heads/hotfix-rc' + - name: Download artifact from hotfix-rc-desktop + if: github.ref == 'refs/heads/hotfix-rc-desktop' uses: dawidd6/action-download-artifact@b2abf1705491048a2d7074f7d90513044fd25d39 # v2.19.0 with: workflow: build-browser.yml workflow_conclusion: success - branch: hotfix-rc + branch: hotfix-rc-desktop path: ${{ github.workspace }}/browser-build-artifacts - name: Download artifact from rc @@ -763,7 +763,7 @@ jobs: path: ${{ github.workspace }}/browser-build-artifacts - name: Download artifact from master - if: ${{ github.ref != 'refs/heads/rc' && github.ref != 'refs/heads/hotfix-rc' }} + if: ${{ github.ref != 'refs/heads/rc' && github.ref != 'refs/heads/hotfix-rc-desktop' }} uses: dawidd6/action-download-artifact@b2abf1705491048a2d7074f7d90513044fd25d39 # v2.19.0 with: workflow: build-browser.yml @@ -962,13 +962,13 @@ jobs: if: steps.build-cache.outputs.cache-hit != 'true' run: npm run build - - name: Download artifact from hotfix-rc - if: github.ref == 'refs/heads/hotfix-rc' + - name: Download artifact from hotfix-rc-desktop + if: github.ref == 'refs/heads/hotfix-rc-desktop' uses: dawidd6/action-download-artifact@b2abf1705491048a2d7074f7d90513044fd25d39 # v2.19.0 with: workflow: build-browser.yml workflow_conclusion: success - branch: hotfix-rc + branch: hotfix-rc-desktop path: ${{ github.workspace }}/browser-build-artifacts - name: Download artifact from rc @@ -981,7 +981,7 @@ jobs: path: ${{ github.workspace }}/browser-build-artifacts - name: Download artifact from master - if: ${{ github.ref != 'refs/heads/rc' && github.ref != 'refs/heads/hotfix-rc' }} + if: ${{ github.ref != 'refs/heads/rc' && github.ref != 'refs/heads/hotfix-rc-desktop' }} uses: dawidd6/action-download-artifact@b2abf1705491048a2d7074f7d90513044fd25d39 # v2.19.0 with: workflow: build-browser.yml @@ -1022,7 +1022,7 @@ jobs: && needs.setup.outputs.rc_branch_exists == 0 && needs.setup.outputs.hotfix_branch_exists == 0) || (github.ref == 'refs/heads/rc' && needs.setup.outputs.hotfix_branch_exists == 0) - || github.ref == 'refs/heads/hotfix-rc' + || github.ref == 'refs/heads/hotfix-rc-desktop' run: npm run upload:mas diff --git a/.github/workflows/build-web.yml b/.github/workflows/build-web.yml index 4e4a398c71b..39784468974 100644 --- a/.github/workflows/build-web.yml +++ b/.github/workflows/build-web.yml @@ -17,7 +17,7 @@ on: branches: - 'master' - 'rc' - - 'hotfix-rc' + - 'hotfix-rc-web' paths: - 'apps/web/**' - 'libs/**' @@ -182,7 +182,7 @@ jobs: echo "GitHub event: $GITHUB_EVENT" - name: Setup DCT - if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc' + if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc-web' id: setup-dct uses: bitwarden/gh-actions/setup-docker-trust@a8c384a05a974c05c48374c818b004be221d43ff with: @@ -225,11 +225,11 @@ jobs: run: docker tag bitwarden/web bitwarden/web:dev - name: Tag hotfix branch - if: github.ref == 'refs/heads/hotfix-rc' - run: docker tag bitwarden/web bitwarden/web:hotfix-rc + if: github.ref == 'refs/heads/hotfix-rc-web' + run: docker tag bitwarden/web bitwarden/web:hotfix-rc-web - name: List Docker images - if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc' + if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc-web' run: docker images - name: Push rc image @@ -247,14 +247,14 @@ jobs: DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ steps.setup-dct.outputs.dct-delegate-repo-passphrase }} - name: Push hotfix image - if: github.ref == 'refs/heads/hotfix-rc' - run: docker push bitwarden/web:hotfix-rc + if: github.ref == 'refs/heads/hotfix-rc-web' + run: docker push bitwarden/web:hotfix-rc-web env: DOCKER_CONTENT_TRUST: 1 DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ steps.setup-dct.outputs.dct-delegate-repo-passphrase }} - name: Log out of Docker - if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc' + if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc-web' run: | docker logout echo "DOCKER_CONTENT_TRUST=0" >> $GITHUB_ENV diff --git a/.github/workflows/release-browser.yml b/.github/workflows/release-browser.yml index 6599212f340..7279d3b08b4 100644 --- a/.github/workflows/release-browser.yml +++ b/.github/workflows/release-browser.yml @@ -31,9 +31,9 @@ jobs: - name: Branch check if: ${{ github.event.inputs.release_type != 'Dry Run' }} run: | - if [[ "$GITHUB_REF" != "refs/heads/rc" ]] && [[ $GITHUB_REF != refs/heads/hotfix-rc ]]; then + if [[ "$GITHUB_REF" != "refs/heads/rc" ]] && [[ $GITHUB_REF != refs/heads/hotfix-rc-browser ]]; then echo "===================================" - echo "[!] Can only release from the 'rc' or 'hotfix-rc' branches" + echo "[!] Can only release from the 'rc' or 'hotfix-rc-browser' branches" echo "===================================" exit 1 fi diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml index 66c324bdd6e..78d645e8a26 100644 --- a/.github/workflows/release-cli.yml +++ b/.github/workflows/release-cli.yml @@ -47,9 +47,9 @@ jobs: - name: Branch check if: ${{ github.event.inputs.release_type != 'Dry Run' }} run: | - if [[ "$GITHUB_REF" != "refs/heads/rc" ]] && [[ $GITHUB_REF != refs/heads/hotfix-rc ]]; then + if [[ "$GITHUB_REF" != "refs/heads/rc" ]] && [[ $GITHUB_REF != refs/heads/hotfix-rc-cli ]]; then echo "===================================" - echo "[!] Can only release from the 'rc' or 'hotfix-rc' branches" + echo "[!] Can only release from the 'rc' or 'hotfix-rc-cli' branches" echo "===================================" exit 1 fi diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.yml index dad38a80ba1..84cbdf17f23 100644 --- a/.github/workflows/release-desktop.yml +++ b/.github/workflows/release-desktop.yml @@ -42,9 +42,9 @@ jobs: - name: Branch check if: ${{ github.event.inputs.release_type != 'Dry Run' }} run: | - if [[ "$GITHUB_REF" != "refs/heads/rc" ]] && [[ $GITHUB_REF != refs/heads/hotfix-rc ]]; then + if [[ "$GITHUB_REF" != "refs/heads/rc" ]] && [[ $GITHUB_REF != refs/heads/hotfix-rc-desktop ]]; then echo "===================================" - echo "[!] Can only release from the 'rc' or 'hotfix-rc' branches" + echo "[!] Can only release from the 'rc' or 'hotfix-rc-desktop' branches" echo "===================================" exit 1 fi diff --git a/.github/workflows/release-web.yml b/.github/workflows/release-web.yml index 7dd828cc5f7..aae053c35c9 100644 --- a/.github/workflows/release-web.yml +++ b/.github/workflows/release-web.yml @@ -28,9 +28,9 @@ jobs: - name: Branch check if: ${{ github.event.inputs.release_type != 'Dry Run' }} run: | - if [[ "$GITHUB_REF" != "refs/heads/rc" ]] && [[ $GITHUB_REF != "refs/heads/hotfix-rc" ]]; then + if [[ "$GITHUB_REF" != "refs/heads/rc" ]] && [[ $GITHUB_REF != "refs/heads/hotfix-rc-web" ]]; then echo "===================================" - echo "[!] Can only release from the 'rc' or 'hotfix-rc' branches" + echo "[!] Can only release from the 'rc' or 'hotfix-rc-web' branches" echo "===================================" exit 1 fi