1
0
mirror of https://github.com/bitwarden/server.git synced 2025-05-20 19:14:32 -05:00

Point workflows to main (#3549)

* Point workflows to main

* Merge in master. Update new version-bump workflow changes
This commit is contained in:
Joseph Flinn 2023-12-12 12:08:12 -08:00 committed by GitHub
parent 52cb253c9a
commit c120b7e867
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 24 additions and 24 deletions

View File

@ -250,7 +250,7 @@ jobs:
- name: Check Branch to Publish - name: Check Branch to Publish
env: env:
PUBLISH_BRANCHES: "master,rc,hotfix-rc" PUBLISH_BRANCHES: "main,rc,hotfix-rc"
id: publish-branch-check id: publish-branch-check
run: | run: |
IFS="," read -a publish_branches <<< $PUBLISH_BRANCHES IFS="," read -a publish_branches <<< $PUBLISH_BRANCHES
@ -287,7 +287,7 @@ jobs:
id: tag id: tag
run: | run: |
IMAGE_TAG=$(echo "${GITHUB_REF:11}" | sed "s#/#-#g") # slash safe branch name 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 IMAGE_TAG=dev
fi fi
echo "image_tag=$IMAGE_TAG" >> $GITHUB_OUTPUT echo "image_tag=$IMAGE_TAG" >> $GITHUB_OUTPUT
@ -361,13 +361,13 @@ jobs:
run: dotnet tool restore run: dotnet tool restore
- name: Make Docker stubs - 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/rc' ||
github.ref == 'refs/heads/hotfix-rc' github.ref == 'refs/heads/hotfix-rc'
run: | run: |
# Set proper setup image based on branch # Set proper setup image based on branch
case "${{ github.ref }}" in case "${{ github.ref }}" in
"refs/heads/master") "refs/heads/main")
SETUP_IMAGE="$_AZ_REGISTRY/setup:dev" SETUP_IMAGE="$_AZ_REGISTRY/setup:dev"
;; ;;
"refs/heads/rc") "refs/heads/rc")
@ -403,13 +403,13 @@ jobs:
cd docker-stub/EU; zip -r ../../docker-stub-EU.zip *; cd ../.. cd docker-stub/EU; zip -r ../../docker-stub-EU.zip *; cd ../..
- name: Make Docker stub checksums - 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: | run: |
sha256sum docker-stub-US.zip > docker-stub-US-sha256.txt sha256sum docker-stub-US.zip > docker-stub-US-sha256.txt
sha256sum docker-stub-EU.zip > docker-stub-EU-sha256.txt sha256sum docker-stub-EU.zip > docker-stub-EU-sha256.txt
- name: Upload Docker stub US artifact - 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 uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with: with:
name: docker-stub-US.zip name: docker-stub-US.zip
@ -417,7 +417,7 @@ jobs:
if-no-files-found: error if-no-files-found: error
- name: Upload Docker stub EU artifact - 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 uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with: with:
name: docker-stub-EU.zip name: docker-stub-EU.zip
@ -425,7 +425,7 @@ jobs:
if-no-files-found: error if-no-files-found: error
- name: Upload Docker stub US checksum artifact - 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 uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with: with:
name: docker-stub-US-sha256.txt name: docker-stub-US-sha256.txt
@ -433,7 +433,7 @@ jobs:
if-no-files-found: error if-no-files-found: error
- name: Upload Docker stub EU checksum artifact - 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 uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with: with:
name: docker-stub-EU-sha256.txt name: docker-stub-EU-sha256.txt
@ -549,7 +549,7 @@ jobs:
owner: 'bitwarden', owner: 'bitwarden',
repo: 'self-host', repo: 'self-host',
workflow_id: 'build-unified.yml', workflow_id: 'build-unified.yml',
ref: 'master', ref: 'main',
inputs: { inputs: {
server_branch: '${{ github.ref }}' server_branch: '${{ github.ref }}'
} }
@ -571,7 +571,7 @@ jobs:
steps: steps:
- name: Check if any job failed - name: Check if any job failed
if: | if: |
github.ref == 'refs/heads/master' github.ref == 'refs/heads/main'
|| github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/rc'
|| github.ref == 'refs/heads/hotfix-rc' || github.ref == 'refs/heads/hotfix-rc'
env: env:

View File

@ -74,7 +74,7 @@ jobs:
steps: steps:
- name: Check if any job failed - name: Check if any job failed
if: | if: |
github.ref == 'refs/heads/master' github.ref == 'refs/heads/main'
|| github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/rc'
|| github.ref == 'refs/heads/hotfix-rc' || github.ref == 'refs/heads/hotfix-rc'
env: env:

View File

@ -1,4 +1,4 @@
--- ---
name: Validate Database name: Validate Database
on: on:
@ -11,7 +11,7 @@ on:
- 'util/Migrator/**' - 'util/Migrator/**'
push: push:
branches: branches:
- 'master' - 'main'
- 'rc' - 'rc'
paths: paths:
- 'src/Sql/**' - 'src/Sql/**'

View File

@ -17,7 +17,7 @@ on:
- 'test/Infrastructure.IntegrationTest/**' # Any changes to the tests - 'test/Infrastructure.IntegrationTest/**' # Any changes to the tests
push: push:
branches: branches:
- 'master' - 'main'
- 'rc' - 'rc'
paths: paths:
- '.github/workflows/infrastructure-tests.yml' # This file - '.github/workflows/infrastructure-tests.yml' # This file

View File

@ -102,7 +102,7 @@ jobs:
with: with:
workflow: build.yml workflow: build.yml
workflow_conclusion: success workflow_conclusion: success
branch: master branch: main
artifacts: ${{ matrix.name }}.zip artifacts: ${{ matrix.name }}.zip
- name: Login to Azure - CI subscription - name: Login to Azure - CI subscription
@ -291,7 +291,7 @@ jobs:
with: with:
workflow: build.yml workflow: build.yml
workflow_conclusion: success workflow_conclusion: success
branch: master branch: main
artifacts: "docker-stub-US.zip, artifacts: "docker-stub-US.zip,
docker-stub-US-sha256.txt, docker-stub-US-sha256.txt,
docker-stub-EU.zip, docker-stub-EU.zip,

View File

@ -27,4 +27,4 @@ jobs:
If youre still working on this, please respond here after youve made the changes weve requested and our team will re-open it for further review. If youre still working on this, please respond here after youve made the changes weve 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.

View File

@ -120,7 +120,7 @@ jobs:
TITLE: "Bump version to ${{ inputs.version_number }}" TITLE: "Bump version to ${{ inputs.version_number }}"
run: | run: |
PR_URL=$(gh pr create --title "$TITLE" \ PR_URL=$(gh pr create --title "$TITLE" \
--base "master" \ --base "main" \
--head "$PR_BRANCH" \ --head "$PR_BRANCH" \
--label "version update" \ --label "version update" \
--label "automated pr" \ --label "automated pr" \