1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-30 01:02:21 -05:00

Fix logic

This commit is contained in:
Vince Grassia 2023-11-09 13:46:40 -05:00
parent 93a9f4c9d7
commit 8abe00db65
No known key found for this signature in database
GPG Key ID: 9AD7505E8448CC08

View File

@ -210,21 +210,41 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
########## ACRs ##########
- name: Login to Azure - PROD Subscription
uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.7
with:
creds: ${{ secrets.AZURE_PROD_KV_CREDENTIALS }}
- name: Login to PROD ACR
run: az acr login -n ${_AZ_REGISTRY%.azurecr.io}
- name: Login to Azure - CI Subscription
uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.7
with:
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
- name: Retrieve github PAT secrets
id: retrieve-secret-pat
uses: bitwarden/gh-actions/get-keyvault-secrets@main
with:
keyvault: "bitwarden-ci"
secrets: "github-pat-bitwarden-devops-bot-repo-scope"
- name: Build Docker image - name: Build Docker image
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
with: with:
context: . context: .
file: build.Dockerfile file: build.Dockerfile
load: true
platforms: | platforms: |
linux/amd64, linux/amd64,
linux/arm/v7, linux/arm/v7,
linux/arm64/v8 linux/arm64/v8
# push: false push: false
tags: bitwarden-build:latest tags: ${{ env._AZ_REGISTRY }}/build:latest
# secrets: | secrets: |
# "GH_PAT=${{ steps.retrieve-secret-pat.outputs.github-pat-bitwarden-devops-bot-repo-scope }}" "GH_PAT=${{ steps.retrieve-secret-pat.outputs.github-pat-bitwarden-devops-bot-repo-scope }}"
build-docker: build-docker:
name: Build Docker images name: Build Docker images
@ -284,11 +304,6 @@ jobs:
echo "is_publish_branch=false" >> $GITHUB_ENV echo "is_publish_branch=false" >> $GITHUB_ENV
fi fi
- name: Docker Test Step
run: |
docker image ls
exit 1
########## Set up Docker ########## ########## Set up Docker ##########
- name: Set up QEMU emulators - name: Set up QEMU emulators
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
@ -318,6 +333,12 @@ jobs:
secrets: "github-pat-bitwarden-devops-bot-repo-scope" secrets: "github-pat-bitwarden-devops-bot-repo-scope"
########## Generate image tag and build Docker image ########## ########## Generate image tag and build Docker image ##########
- name: Docker Test Step
run: |
docker image pull $_AZ_REGISTRY/build:latest
docker image ls
exit 1
- name: Generate Docker image tag - name: Generate Docker image tag
id: tag id: tag
run: | run: |