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

Try caching

This commit is contained in:
Vince Grassia 2024-05-08 15:59:57 -04:00
parent 144ecb452b
commit dd02ffbe9f
No known key found for this signature in database
GPG Key ID: 9AD7505E8448CC08

View File

@ -153,17 +153,16 @@ jobs:
echo "tags=$TAGS" >> $GITHUB_OUTPUT echo "tags=$TAGS" >> $GITHUB_OUTPUT
- name: Generate image full name - name: Generate image full name
id: image-name id: cache-name
env: env:
IMAGE_TAG: ${{ steps.tag.outputs.image_tag }}
PROJECT_NAME: ${{ steps.setup.outputs.project_name }} PROJECT_NAME: ${{ steps.setup.outputs.project_name }}
run: echo "name=${_AZ_REGISTRY}/${PROJECT_NAME}:${IMAGE_TAG}" >> $GITHUB_OUTPUT run: echo "name=${_AZ_REGISTRY}/${PROJECT_NAME}:buildcache" >> $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:
cache-from: type=registry,ref=${{ steps.image-name.outputs.name }} cache-from: type=registry,ref=${{ steps.cache-name.outputs.name }}
cache-to: type=inline cache-to: type=registry,ref=${{ steps.cache-name.outputs.name}},mode=max
context: . context: .
file: ${{ matrix.base_path }}/${{ matrix.project_name }}/Dockerfile file: ${{ matrix.base_path }}/${{ matrix.project_name }}/Dockerfile
platforms: | platforms: |
@ -171,9 +170,7 @@ jobs:
linux/arm/v7, linux/arm/v7,
linux/arm64 linux/arm64
push: true push: true
tags: ${{ steps.image-name.outputs.name }} tags: ${{ steps.image-tags.outputs.tags }}
secrets: |
"GH_PAT=${{ steps.retrieve-secret-pat.outputs.github-pat-bitwarden-devops-bot-repo-scope }}"
- name: Scan Docker image - name: Scan Docker image
id: container-scan id: container-scan