diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 953d9547b..7cdc0d8bc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -250,7 +250,7 @@ jobs: - name: Check Branch to Publish env: - PUBLISH_BRANCHES: "master,rc,hotfix-rc" + PUBLISH_BRANCHES: "main,rc,hotfix-rc" id: publish-branch-check run: | IFS="," read -a publish_branches <<< $PUBLISH_BRANCHES @@ -287,7 +287,7 @@ jobs: id: tag run: | IMAGE_TAG=$(echo "${GITHUB_REF:11}" | sed "s#/#-#g") # slash safe branch name - if [[ "$IMAGE_TAG" == "master" ]]; then + if [[ "$IMAGE_TAG" == "main" ]]; then IMAGE_TAG=dev fi echo "image_tag=$IMAGE_TAG" >> $GITHUB_OUTPUT @@ -361,13 +361,13 @@ jobs: run: dotnet tool restore - name: Make Docker stubs - if: github.ref == 'refs/heads/master' || + if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc' run: | # Set proper setup image based on branch case "${{ github.ref }}" in - "refs/heads/master") + "refs/heads/main") SETUP_IMAGE="$_AZ_REGISTRY/setup:dev" ;; "refs/heads/rc") @@ -403,13 +403,13 @@ jobs: cd docker-stub/EU; zip -r ../../docker-stub-EU.zip *; cd ../.. - name: Make Docker stub checksums - if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc' + if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc' run: | sha256sum docker-stub-US.zip > docker-stub-US-sha256.txt sha256sum docker-stub-EU.zip > docker-stub-EU-sha256.txt - name: Upload Docker stub US artifact - if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc' + if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc' uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: docker-stub-US.zip @@ -417,7 +417,7 @@ jobs: if-no-files-found: error - name: Upload Docker stub EU artifact - if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc' + if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc' uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: docker-stub-EU.zip @@ -425,7 +425,7 @@ jobs: if-no-files-found: error - name: Upload Docker stub US checksum artifact - if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc' + if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc' uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: docker-stub-US-sha256.txt @@ -433,7 +433,7 @@ jobs: if-no-files-found: error - name: Upload Docker stub EU checksum artifact - if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc' + if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc' uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: docker-stub-EU-sha256.txt @@ -549,7 +549,7 @@ jobs: owner: 'bitwarden', repo: 'self-host', workflow_id: 'build-unified.yml', - ref: 'master', + ref: 'main', inputs: { server_branch: '${{ github.ref }}' } @@ -571,7 +571,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/container-registry-purge.yml b/.github/workflows/container-registry-purge.yml index e1bfdcaa0..f9999e8dc 100644 --- a/.github/workflows/container-registry-purge.yml +++ b/.github/workflows/container-registry-purge.yml @@ -74,7 +74,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/database.yml b/.github/workflows/database.yml index 3b5b1ac49..2527440ab 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -1,4 +1,4 @@ ---- +--- name: Validate Database on: @@ -11,7 +11,7 @@ on: - 'util/Migrator/**' push: branches: - - 'master' + - 'main' - 'rc' paths: - 'src/Sql/**' @@ -31,7 +31,7 @@ jobs: uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0 with: dotnet-version: '6.0.x' - + - name: Print environment run: | dotnet --info diff --git a/.github/workflows/infrastructure-tests.yml b/.github/workflows/infrastructure-tests.yml index e6f649f9f..1e17203bf 100644 --- a/.github/workflows/infrastructure-tests.yml +++ b/.github/workflows/infrastructure-tests.yml @@ -17,7 +17,7 @@ on: - 'test/Infrastructure.IntegrationTest/**' # Any changes to the tests push: branches: - - 'master' + - 'main' - 'rc' paths: - '.github/workflows/infrastructure-tests.yml' # This file @@ -55,7 +55,7 @@ jobs: cp .env.example .env docker compose --profile mssql --profile postgres --profile mysql up -d shell: pwsh - + # I've seen the SQL Server container not be ready for commands right after starting up and just needing a bit longer to be ready - name: Sleep run: sleep 15s @@ -76,13 +76,13 @@ jobs: run: 'dotnet ef database update --connection "$CONN_STR" -- --GlobalSettings:PostgreSql:ConnectionString="$CONN_STR"' env: CONN_STR: "Host=localhost;Username=postgres;Password=SET_A_PASSWORD_HERE_123;Database=vault_dev" - + - name: Migrate Sqlite working-directory: 'util/SqliteMigrations' run: 'dotnet ef database update --connection "$CONN_STR" -- --GlobalSettings:Sqlite:ConnectionString="$CONN_STR"' env: CONN_STR: "Data Source=${{ runner.temp }}/test.db" - + - name: Run Tests working-directory: 'test/Infrastructure.IntegrationTest' env: @@ -109,7 +109,7 @@ jobs: path: "**/*-test-results.trx" reporter: dotnet-trx fail-on-error: true - + - name: Docker compose down if: always() working-directory: "dev" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 19aff278f..9839641d2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -102,7 +102,7 @@ jobs: with: workflow: build.yml workflow_conclusion: success - branch: master + branch: main artifacts: ${{ matrix.name }}.zip - name: Login to Azure - CI subscription @@ -291,7 +291,7 @@ jobs: with: workflow: build.yml workflow_conclusion: success - branch: master + branch: main artifacts: "docker-stub-US.zip, docker-stub-US-sha256.txt, docker-stub-EU.zip, diff --git a/.github/workflows/stale-bot.yml b/.github/workflows/stale-bot.yml index 98f3b9d17..1bd058b94 100644 --- a/.github/workflows/stale-bot.yml +++ b/.github/workflows/stale-bot.yml @@ -27,4 +27,4 @@ jobs: If you’re still working on this, please respond here after you’ve made the changes we’ve requested and our team will re-open it for further review. - Please make sure to resolve any conflicts with the master branch before requesting another review. + Please make sure to resolve any conflicts with the main branch before requesting another review. diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index 8b0c1166f..8d0057697 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -120,7 +120,7 @@ jobs: TITLE: "Bump version to ${{ inputs.version_number }}" run: | PR_URL=$(gh pr create --title "$TITLE" \ - --base "master" \ + --base "main" \ --head "$PR_BRANCH" \ --label "version update" \ --label "automated pr" \