Skip to content

Commit

Permalink
perf: Use build cache from Azure Blob Storage
Browse files Browse the repository at this point in the history
  • Loading branch information
clemlesne committed Nov 19, 2024
1 parent 8b52e97 commit e2fb414
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ jobs:
build-release-linux:
name: Build & release image (Linux ${{ matrix.os }})
permissions:
contents: read
id-token: write
needs:
- init
- sast-creds
Expand Down Expand Up @@ -359,6 +362,21 @@ jobs:
with:
cosign-release: v${{ env.COSIGN_VERSION }}

# Required for buildx cache
- name: Login to Azure
uses: azure/[email protected]
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}

# Required for buildx cache
- name: Setup Azure CLI
run: |
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
az --version
az account show
- name: Login to registry - GitHub
uses: docker/[email protected]
with:
Expand Down Expand Up @@ -433,8 +451,10 @@ jobs:
ROOTLESSKIT_VERSION=${{ env.ROOTLESSKIT_VERSION }}
TINI_VERSION=${{ env.TINI_VERSION }}
YQ_VERSION=${{ env.YQ_VERSION }}
cache-from: ${{ steps.tag.outputs.tag }}-cache
cache-to: ${{ steps.tag.outputs.tag }}-cache
cache-from: |
type=azblob,account_url=${{ secrets.BUILDKIT_AZURE_STORAGE_ACCOUNT_URL }},name=${{ matrix.os }}-${{ github.ref_name }}
type=azblob,account_url=${{ secrets.BUILDKIT_AZURE_STORAGE_ACCOUNT_URL }},name=${{ matrix.os }}-${{ github.sha }}
cache-to: type=azblob,account_url=${{ secrets.BUILDKIT_AZURE_STORAGE_ACCOUNT_URL }},name=${{ matrix.os }}-${{ github.ref_name }};${{ matrix.os }}-${{ github.sha }}
context: src/docker
file: src/docker/Dockerfile-${{ matrix.os }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down

0 comments on commit e2fb414

Please sign in to comment.