1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-23 14:05:10 -05:00

Fix errors

This commit is contained in:
Vince Grassia 2024-05-08 14:32:52 -04:00
parent 31d0480316
commit d034fa10b0
No known key found for this signature in database
GPG Key ID: 9AD7505E8448CC08

View File

@ -30,8 +30,7 @@ jobs:
build-artifacts: build-artifacts:
name: Build artifacts name: Build artifacts
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
needs: needs: lint
- lint
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -193,10 +192,10 @@ jobs:
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
########## ACRs ########## ########## ACRs ##########
- name: Log in to Azure - production subscription - name: Log in to Azure - CI subscription
uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.7 uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.7
with: with:
creds: ${{ secrets.AZURE_PROD_KV_CREDENTIALS }} creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
- name: Login to PROD ACR - name: Login to PROD ACR
run: az acr login -n ${_AZ_REGISTRY%.azurecr.io} run: az acr login -n ${_AZ_REGISTRY%.azurecr.io}
@ -241,6 +240,13 @@ jobs:
fi fi
echo "tags=$TAGS" >> $GITHUB_OUTPUT echo "tags=$TAGS" >> $GITHUB_OUTPUT
- name: Generate image full name
id: image-name
env:
IMAGE_TAG: ${{ steps.tag.outputs.image_tag }}
PROJECT_NAME: ${{ steps.setup.outputs.project_name }}
run: echo "name=${_AZ_REGISTRY}/${PROJECT_NAME}:${IMAGE_TAG}" >> $GITHUB_OUTPUT
- 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:
@ -255,29 +261,6 @@ jobs:
push: true push: true
tags: ${{ steps.image-name.outputs.name }} tags: ${{ steps.image-name.outputs.name }}
- name: Zip project
if: ${{ matrix.upload_artifact }}
working-directory: ${{ matrix.base_path }}/${{ matrix.project_name }}
run: |
mkdir build
docker run --rm --platform linux/amd64 --volume $(pwd)/build:/temp --entrypoint bash \
${{ steps.image-name.outputs.name }} -c "cp -r ./ /temp"
cd build
zip -r ${{ matrix.project_name }}.zip .
mv ${{ matrix.project_name }}.zip ../
pwd
ls -atlh ../
- name: Upload project artifact
if: ${{ matrix.upload_artifact }}
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: ${{ matrix.project_name }}.zip
path: ${{ matrix.base_path }}/${{ matrix.project_name }}/${{ matrix.project_name }}.zip
if-no-files-found: error
- name: Scan Docker image - name: Scan Docker image
id: container-scan id: container-scan
uses: anchore/scan-action@3343887d815d7b07465f6fdcd395bd66508d486a # v3.6.4 uses: anchore/scan-action@3343887d815d7b07465f6fdcd395bd66508d486a # v3.6.4
@ -291,13 +274,10 @@ jobs:
with: with:
sarif_file: ${{ steps.container-scan.outputs.sarif }} sarif_file: ${{ steps.container-scan.outputs.sarif }}
- name: Log out of Docker
run: docker logout
build-stub-swagger: build-stub-swagger:
name: Build Docker-Stub/Swagger name: Build Docker-Stub/Swagger
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
needs: testing needs: build-docker
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@ -422,7 +402,7 @@ jobs:
build-mssqlmigratorutility: build-mssqlmigratorutility:
name: Build MSSQL migrator utility name: Build MSSQL migrator utility
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
needs: testing needs: build-docker
defaults: defaults:
run: run:
shell: bash shell: bash
@ -548,7 +528,6 @@ jobs:
- lint - lint
- build-artifacts - build-artifacts
- build-docker - build-docker
- upload
- build-mssqlmigratorutility - build-mssqlmigratorutility
- self-host-build - self-host-build
- trigger-k8s-deploy - trigger-k8s-deploy