From 83a8618021fb94ee15ed42a4f76600be60e13ccd Mon Sep 17 00:00:00 2001 From: Joseph Flinn <58369717+joseph-flinn@users.noreply.github.com> Date: Tue, 12 Dec 2023 12:09:22 -0800 Subject: [PATCH] Point workflows to main (#190) --- .github/workflows/build-unified.yml | 18 +++++++++--------- .github/workflows/release.yml | 12 ++++++------ .github/workflows/update-versions.yml | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-unified.yml b/.github/workflows/build-unified.yml index 6509390..095be87 100644 --- a/.github/workflows/build-unified.yml +++ b/.github/workflows/build-unified.yml @@ -10,16 +10,16 @@ on: inputs: server_branch: type: string - default: master + default: main is_workflow_call: type: boolean default: true workflow_dispatch: inputs: server_branch: - description: "Server branch name to deploy (examples: 'master', 'rc', 'feature/sm')" + description: "Server branch name to deploy (examples: 'main', 'rc', 'feature/sm')" type: string - default: master + default: main pull_request: paths: - ".github/workflows/build-unified.yml" @@ -38,7 +38,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: bitwarden/self-host - ref: master + ref: main - name: Checkout Repository - workflow_dispatch if: ${{ inputs.is_workflow_call != true }} @@ -50,19 +50,19 @@ jobs: SERVER_BRANCH: ${{ inputs.server_branch }} run: | if [[ -z "${SERVER_BRANCH}" ]]; then - echo "server_branch=master" >> $GITHUB_OUTPUT + echo "server_branch=main" >> $GITHUB_OUTPUT else echo "server_branch=${SERVER_BRANCH#refs/heads/}" >> $GITHUB_OUTPUT fi - name: Check Branch to Publish env: - PUBLISH_BRANCHES: "master,rc,hotfix-rc" + PUBLISH_BRANCHES: "main,rc,hotfix-rc" SERVER_BRANCH: ${{ steps.server-branch-name.outputs.server_branch }} id: publish-branch-check run: | if [[ "${{ inputs.is_workflow_call }}" == "true" ]]; then - REF=master + REF=main else REF=${GITHUB_REF#refs/heads/} fi @@ -117,7 +117,7 @@ jobs: SERVER_BRANCH: ${{ steps.server-branch-name.outputs.server_branch }} run: | IMAGE_TAG=$(echo "${SERVER_BRANCH}" | sed "s#/#-#g") # slash safe branch name - if [[ "${IMAGE_TAG}" == "master" ]]; then + if [[ "${IMAGE_TAG}" == "main" ]]; then IMAGE_TAG=dev elif [[ ("${IMAGE_TAG}" == "rc") || ("${IMAGE_TAG}" == "hotfix-rc") ]]; then IMAGE_TAG=beta @@ -173,7 +173,7 @@ jobs: steps: - name: Check if any job failed if: | - github.ref == 'refs/heads/master' + github.ref == 'refs/heads/main' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc' env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 29520ad..aace33a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,9 +31,9 @@ jobs: - name: Branch check if: ${{ github.event.inputs.release_type != 'Dry Run' }} run: | - if [[ "$GITHUB_REF" != "refs/heads/master" ]]; then + if [[ "$GITHUB_REF" != "refs/heads/main" ]]; then echo "===================================" - echo "[!] Can only release from the 'master' branch" + echo "[!] Can only release from the 'main' branch" echo "===================================" exit 1 fi @@ -74,7 +74,7 @@ jobs: - name: Checkout repo uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: - ref: master + ref: main - name: Create release if: ${{ github.event.inputs.release_type != 'Dry Run' }} @@ -102,7 +102,7 @@ jobs: - name: Checkout repo uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: - ref: master + ref: main - name: Login to Azure - CI Subscription uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.7 @@ -155,7 +155,7 @@ jobs: - release env: _CORE_RELEASE_TAG: ${{ needs.setup.outputs._CORE_RELEASE_TAG }} - _BRANCH_NAME: master + _BRANCH_NAME: main strategy: fail-fast: false matrix: @@ -187,7 +187,7 @@ jobs: - name: Checkout repo uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: - ref: master + ref: main - name: Login to Azure - Prod Subscription uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.7 diff --git a/.github/workflows/update-versions.yml b/.github/workflows/update-versions.yml index 39ded27..0f7891c 100644 --- a/.github/workflows/update-versions.yml +++ b/.github/workflows/update-versions.yml @@ -8,7 +8,7 @@ on: jobs: setup: name: Setup - if: github.ref_name == 'master' + if: github.ref_name == 'main' runs-on: ubuntu-22.04 outputs: core_version: ${{ steps.get-core.outputs.version }}