mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 06:13:38 +00:00
Update build web workflow (#14111)
This commit is contained in:
37
.github/workflows/build-web.yml
vendored
37
.github/workflows/build-web.yml
vendored
@@ -82,7 +82,7 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
build-containers:
|
build-containers:
|
||||||
name: Build artifacts and container images
|
name: "Build [${{matrix.artifact_name}}], image tag: [${{matrix.image_name}}]"
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
permissions:
|
permissions:
|
||||||
security-events: write
|
security-events: write
|
||||||
@@ -158,6 +158,17 @@ jobs:
|
|||||||
mv package.json.tmp package.json
|
mv package.json.tmp package.json
|
||||||
|
|
||||||
########## Set up Docker ##########
|
########## Set up Docker ##########
|
||||||
|
- name: Set up Docker
|
||||||
|
uses: docker/setup-docker-action@b60f85385d03ac8acfca6d9996982511d8620a19 # v4.3.0
|
||||||
|
with:
|
||||||
|
daemon-config: |
|
||||||
|
{
|
||||||
|
"debug": true,
|
||||||
|
"features": {
|
||||||
|
"containerd-snapshotter": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- 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
|
||||||
|
|
||||||
@@ -175,20 +186,6 @@ jobs:
|
|||||||
if: ${{ needs.setup.outputs.has_secrets == 'true' }}
|
if: ${{ needs.setup.outputs.has_secrets == 'true' }}
|
||||||
run: az acr login -n ${_AZ_REGISTRY%.azurecr.io}
|
run: az acr login -n ${_AZ_REGISTRY%.azurecr.io}
|
||||||
|
|
||||||
- name: Login to Azure - CI Subscription
|
|
||||||
if: ${{ needs.setup.outputs.has_secrets == 'true' }}
|
|
||||||
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
|
|
||||||
with:
|
|
||||||
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
|
|
||||||
|
|
||||||
- name: Retrieve github PAT secrets
|
|
||||||
if: ${{ needs.setup.outputs.has_secrets == 'true' }}
|
|
||||||
id: retrieve-secret-pat
|
|
||||||
uses: bitwarden/gh-actions/get-keyvault-secrets@main
|
|
||||||
with:
|
|
||||||
keyvault: "bitwarden-ci"
|
|
||||||
secrets: "github-pat-bitwarden-devops-bot-repo-scope"
|
|
||||||
|
|
||||||
########## Generate image tag and build Docker image ##########
|
########## Generate image tag and build Docker image ##########
|
||||||
- name: Generate container image tag
|
- name: Generate container image tag
|
||||||
id: tag
|
id: tag
|
||||||
@@ -220,7 +217,6 @@ jobs:
|
|||||||
run: echo "name=$_AZ_REGISTRY/${PROJECT_NAME}:${IMAGE_TAG}" >> $GITHUB_OUTPUT
|
run: echo "name=$_AZ_REGISTRY/${PROJECT_NAME}:${IMAGE_TAG}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Build Docker image
|
- name: Build Docker image
|
||||||
if: ${{ needs.setup.outputs.has_secrets == 'true' }}
|
|
||||||
id: build-container
|
id: build-container
|
||||||
uses: docker/build-push-action@67a2d409c0a876cbe6b11854e3e25193efe4e62d # v6.12.0
|
uses: docker/build-push-action@67a2d409c0a876cbe6b11854e3e25193efe4e62d # v6.12.0
|
||||||
with:
|
with:
|
||||||
@@ -229,13 +225,20 @@ jobs:
|
|||||||
NPM_COMMAND=${{ matrix.npm_command }}
|
NPM_COMMAND=${{ matrix.npm_command }}
|
||||||
context: .
|
context: .
|
||||||
file: apps/web/Dockerfile
|
file: apps/web/Dockerfile
|
||||||
|
load: true
|
||||||
platforms: |
|
platforms: |
|
||||||
linux/amd64,
|
linux/amd64,
|
||||||
linux/arm/v7,
|
linux/arm/v7,
|
||||||
linux/arm64
|
linux/arm64
|
||||||
push: true
|
push: false
|
||||||
tags: ${{ steps.image-name.outputs.name }}
|
tags: ${{ steps.image-name.outputs.name }}
|
||||||
|
|
||||||
|
- name: Push images
|
||||||
|
if: ${{ needs.setup.outputs.has_secrets == 'true' }}
|
||||||
|
env:
|
||||||
|
IMAGE_NAME: ${{ steps.image-name.outputs.name }}
|
||||||
|
run: docker push $IMAGE_NAME
|
||||||
|
|
||||||
- name: Zip project
|
- name: Zip project
|
||||||
working-directory: apps/web
|
working-directory: apps/web
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user