Skip to content

Commit

Permalink
chore: refine CI Docker cache
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentchalamon committed Sep 10, 2024
1 parent f7dea96 commit 8ce2fdb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,12 @@ jobs:
compose.yaml
compose.prod.yaml
set: |
*.cache-from=type=gha,scope=${{ github.ref }}
*.cache-from=type=gha,scope=refs/heads/main
*.cache-to=type=gha,scope=${{ github.ref }},mode=max
php.cache-from=type=gha,scope=${{ github.ref }}
php.cache-from=type=gha,scope=refs/heads/main
php.cache-to=type=gha,scope=${{ github.ref }},mode=max
pwa.cache-from=type=gha,scope=${{ github.ref }}
pwa.cache-from=type=gha,scope=refs/heads/main
pwa.cache-to=type=gha,scope=${{ github.ref }},mode=max
-
name: Docker push
run: |
Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ jobs:
compose.yaml
compose.override.yaml
set: |
*.cache-from=type=gha,scope=${{ github.ref }}
*.cache-from=type=gha,scope=refs/heads/main
*.cache-to=type=gha,scope=${{ github.ref }},mode=max
php.cache-from=type=gha,scope=${{ github.ref }}
php.cache-from=type=gha,scope=refs/heads/main
php.cache-to=type=gha,scope=${{ github.ref }},mode=max
pwa.cache-from=type=gha,scope=${{ github.ref }}
pwa.cache-from=type=gha,scope=refs/heads/main
pwa.cache-to=type=gha,scope=${{ github.ref }},mode=max
-
name: Start services
run: docker compose up --wait --no-build
Expand Down Expand Up @@ -130,10 +133,14 @@ jobs:
compose.yaml
compose.prod.yaml
set: |
*.cache-from=type=gha,scope=${{ github.ref }}-e2e
*.cache-from=type=gha,scope=${{ github.ref }}
*.cache-from=type=gha,scope=refs/heads/main
*.cache-to=type=gha,scope=${{ github.ref }}-e2e,mode=max
php.cache-from=type=gha,scope=${{ github.ref }}-e2e
php.cache-from=type=gha,scope=${{ github.ref }}
php.cache-from=type=gha,scope=refs/heads/main
php.cache-to=type=gha,scope=${{ github.ref }}-e2e,mode=max
pwa.cache-from=type=gha,scope=${{ github.ref }}-e2e
pwa.cache-from=type=gha,scope=${{ github.ref }}
pwa.cache-from=type=gha,scope=refs/heads/main
pwa.cache-to=type=gha,scope=${{ github.ref }}-e2e,mode=max
-
name: Start Services
run: docker compose up --wait --no-build
Expand Down

0 comments on commit 8ce2fdb

Please sign in to comment.