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:
parent
52cb253c9a
commit
c120b7e867
22
.github/workflows/build.yml
vendored
22
.github/workflows/build.yml
vendored
@ -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:
|
||||||
|
@ -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:
|
||||||
|
6
.github/workflows/database.yml
vendored
6
.github/workflows/database.yml
vendored
@ -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/**'
|
||||||
@ -31,7 +31,7 @@ jobs:
|
|||||||
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0
|
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0
|
||||||
with:
|
with:
|
||||||
dotnet-version: '6.0.x'
|
dotnet-version: '6.0.x'
|
||||||
|
|
||||||
- name: Print environment
|
- name: Print environment
|
||||||
run: |
|
run: |
|
||||||
dotnet --info
|
dotnet --info
|
||||||
|
10
.github/workflows/infrastructure-tests.yml
vendored
10
.github/workflows/infrastructure-tests.yml
vendored
@ -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
|
||||||
@ -55,7 +55,7 @@ jobs:
|
|||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
docker compose --profile mssql --profile postgres --profile mysql up -d
|
docker compose --profile mssql --profile postgres --profile mysql up -d
|
||||||
shell: pwsh
|
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
|
# 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
|
- name: Sleep
|
||||||
run: sleep 15s
|
run: sleep 15s
|
||||||
@ -76,13 +76,13 @@ jobs:
|
|||||||
run: 'dotnet ef database update --connection "$CONN_STR" -- --GlobalSettings:PostgreSql:ConnectionString="$CONN_STR"'
|
run: 'dotnet ef database update --connection "$CONN_STR" -- --GlobalSettings:PostgreSql:ConnectionString="$CONN_STR"'
|
||||||
env:
|
env:
|
||||||
CONN_STR: "Host=localhost;Username=postgres;Password=SET_A_PASSWORD_HERE_123;Database=vault_dev"
|
CONN_STR: "Host=localhost;Username=postgres;Password=SET_A_PASSWORD_HERE_123;Database=vault_dev"
|
||||||
|
|
||||||
- name: Migrate Sqlite
|
- name: Migrate Sqlite
|
||||||
working-directory: 'util/SqliteMigrations'
|
working-directory: 'util/SqliteMigrations'
|
||||||
run: 'dotnet ef database update --connection "$CONN_STR" -- --GlobalSettings:Sqlite:ConnectionString="$CONN_STR"'
|
run: 'dotnet ef database update --connection "$CONN_STR" -- --GlobalSettings:Sqlite:ConnectionString="$CONN_STR"'
|
||||||
env:
|
env:
|
||||||
CONN_STR: "Data Source=${{ runner.temp }}/test.db"
|
CONN_STR: "Data Source=${{ runner.temp }}/test.db"
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
working-directory: 'test/Infrastructure.IntegrationTest'
|
working-directory: 'test/Infrastructure.IntegrationTest'
|
||||||
env:
|
env:
|
||||||
@ -109,7 +109,7 @@ jobs:
|
|||||||
path: "**/*-test-results.trx"
|
path: "**/*-test-results.trx"
|
||||||
reporter: dotnet-trx
|
reporter: dotnet-trx
|
||||||
fail-on-error: true
|
fail-on-error: true
|
||||||
|
|
||||||
- name: Docker compose down
|
- name: Docker compose down
|
||||||
if: always()
|
if: always()
|
||||||
working-directory: "dev"
|
working-directory: "dev"
|
||||||
|
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@ -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,
|
||||||
|
2
.github/workflows/stale-bot.yml
vendored
2
.github/workflows/stale-bot.yml
vendored
@ -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.
|
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.
|
||||||
|
2
.github/workflows/version-bump.yml
vendored
2
.github/workflows/version-bump.yml
vendored
@ -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" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user