-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: Use build cache from Azure Blob Storage
- Loading branch information
Showing
1 changed file
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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: | ||
|
@@ -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 }} | ||
|