|
|
|
|
@ -305,7 +305,7 @@ jobs:
@@ -305,7 +305,7 @@ jobs:
|
|
|
|
|
- name: Login to Azure - Prod Subscription |
|
|
|
|
if: | |
|
|
|
|
contains(matrix.docker_repos, 'bitwarden') |
|
|
|
|
&& (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix') |
|
|
|
|
&& (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc') |
|
|
|
|
uses: Azure/login@77f1b2e3fb80c0e8645114159d17008b8a2e475a |
|
|
|
|
with: |
|
|
|
|
creds: ${{ secrets.AZURE_PROD_KV_CREDENTIALS }} |
|
|
|
|
@ -313,7 +313,7 @@ jobs:
@@ -313,7 +313,7 @@ jobs:
|
|
|
|
|
- name: Retrieve secrets |
|
|
|
|
if: | |
|
|
|
|
contains(matrix.docker_repos, 'bitwarden') |
|
|
|
|
&& (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix') |
|
|
|
|
&& (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc') |
|
|
|
|
id: retrieve-secrets |
|
|
|
|
uses: Azure/get-keyvault-secrets@80ccd3fafe5662407cc2e55f202ee34bfff8c403 |
|
|
|
|
with: |
|
|
|
|
@ -326,7 +326,7 @@ jobs:
@@ -326,7 +326,7 @@ jobs:
|
|
|
|
|
- name: Log into Docker |
|
|
|
|
if: | |
|
|
|
|
contains(matrix.docker_repos, 'bitwarden') |
|
|
|
|
&& (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix') |
|
|
|
|
&& (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc') |
|
|
|
|
env: |
|
|
|
|
DOCKER_USERNAME: ${{ steps.retrieve-secrets.outputs.docker-username }} |
|
|
|
|
DOCKER_PASSWORD: ${{ steps.retrieve-secrets.outputs.docker-password }} |
|
|
|
|
@ -335,7 +335,7 @@ jobs:
@@ -335,7 +335,7 @@ jobs:
|
|
|
|
|
- name: Setup Docker Trust |
|
|
|
|
if: | |
|
|
|
|
contains(matrix.docker_repos, 'bitwarden') |
|
|
|
|
&& (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix') |
|
|
|
|
&& (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc') |
|
|
|
|
env: |
|
|
|
|
DCT_DELEGATION_KEY_ID: "c9bde8ec820701516491e5e03d3a6354e7bd66d05fa3df2b0062f68b116dc59c" |
|
|
|
|
DCT_DELEGATE_KEY: ${{ steps.retrieve-secrets.outputs.dct-delegate-2-key }} |
|
|
|
|
@ -349,7 +349,7 @@ jobs:
@@ -349,7 +349,7 @@ jobs:
|
|
|
|
|
- name: Tag and Push RC to Docker Hub |
|
|
|
|
if: | |
|
|
|
|
contains(matrix.docker_repos, 'bitwarden') |
|
|
|
|
&& (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix') |
|
|
|
|
&& (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc') |
|
|
|
|
env: |
|
|
|
|
REGISTRY: bitwarden |
|
|
|
|
run: | |
|
|
|
|
@ -365,7 +365,7 @@ jobs:
@@ -365,7 +365,7 @@ jobs:
|
|
|
|
|
- name: Log out of Docker and disable Docker Notary |
|
|
|
|
if: | |
|
|
|
|
contains(matrix.docker_repos, 'bitwarden') |
|
|
|
|
&& (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix') |
|
|
|
|
&& (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc') |
|
|
|
|
run: | |
|
|
|
|
docker logout |
|
|
|
|
echo "DOCKER_CONTENT_TRUST=0" >> $GITHUB_ENV |
|
|
|
|
@ -383,12 +383,12 @@ jobs:
@@ -383,12 +383,12 @@ jobs:
|
|
|
|
|
run: dotnet tool restore |
|
|
|
|
|
|
|
|
|
- name: Make Docker stub |
|
|
|
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix' |
|
|
|
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc' |
|
|
|
|
run: | |
|
|
|
|
if [[ "${{ github.ref }}" == "rc" ]]; then |
|
|
|
|
SETUP_IMAGE="bitwarden/setup:rc" |
|
|
|
|
elif [[ "${{ github.ref }}" == "hotfix" ]]; then |
|
|
|
|
SETUP_IMAGE="bitwarden/setup:hotfix" |
|
|
|
|
elif [[ "${{ github.ref }}" == "hotfix-rc" ]]; then |
|
|
|
|
SETUP_IMAGE="bitwarden/setup:hotfix-rc" |
|
|
|
|
else |
|
|
|
|
SETUP_IMAGE="bitwarden/setup:dev" |
|
|
|
|
fi |
|
|
|
|
@ -403,7 +403,7 @@ jobs:
@@ -403,7 +403,7 @@ jobs:
|
|
|
|
|
cd docker-stub; zip -r ../docker-stub.zip *; cd .. |
|
|
|
|
|
|
|
|
|
- name: Upload Docker stub artifact |
|
|
|
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix' |
|
|
|
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/hotfix-rc' |
|
|
|
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 |
|
|
|
|
with: |
|
|
|
|
name: docker-stub.zip |
|
|
|
|
@ -450,7 +450,7 @@ jobs:
@@ -450,7 +450,7 @@ jobs:
|
|
|
|
|
if: | |
|
|
|
|
github.ref == 'refs/heads/master' |
|
|
|
|
|| github.ref == 'refs/heads/rc' |
|
|
|
|
|| github.ref == 'refs/heads/hotfix' |
|
|
|
|
|| github.ref == 'refs/heads/hotfix-rc' |
|
|
|
|
env: |
|
|
|
|
CLOC_STATUS: ${{ needs.cloc.result }} |
|
|
|
|
TESTING_STATUS: ${{ needs.testing.result }} |
|
|
|
|
|