Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/cd_builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Log in to GitHub Container Registry
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
Expand All @@ -51,8 +52,14 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=cd-builder
cache-to: type=gha,mode=max,scope=cd-builder
cache-from: |
type=gha,scope=cd-builder-${{ github.head_ref || github.ref_name }}
type=registry,ref=ghcr.io/${{ github.repository }}:buildcache
type=gha,scope=cd-builder-develop
type=gha,scope=cd-builder-main
cache-to: |
type=gha,mode=max,scope=cd-builder-${{ github.head_ref || github.ref_name }}
${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') && format('type=registry,ref=ghcr.io/{0}:buildcache,mode=max', github.repository) || '' }}

- name: Generate artifact attestation
uses: actions/attest-build-provenance@v3
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/ci_docker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GHCR (for registry cache)
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Docker image with cache
uses: docker/build-push-action@v6
with:
Expand All @@ -23,8 +30,12 @@ jobs:
push: false
load: true
tags: ghcr.io/${{ github.repository }}:latest
cache-from: type=gha,scope=docker-test
cache-to: type=gha,mode=max,scope=docker-test
cache-from: |
type=gha,scope=docker-test-${{ github.head_ref || github.ref_name }}
type=registry,ref=ghcr.io/${{ github.repository }}:buildcache
type=gha,scope=docker-test-develop
type=gha,scope=docker-test-main
cache-to: type=gha,mode=max,scope=docker-test-${{ github.head_ref || github.ref_name }}

- name: Setup environment
run: |
Expand Down
Loading