Skip to content

Commit

Permalink
ci: improved Docker cache (api-platform#2761)
Browse files Browse the repository at this point in the history
  • Loading branch information
nervo authored Sep 9, 2024
1 parent cf94fd7 commit 707679b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,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=php-${{github.ref}}
php.cache-from=type=gha,scope=php-refs/heads/main
php.cache-to=type=gha,scope=php-${{github.ref}},mode=max
pwa.cache-from=type=gha,scope=pwa-${{github.ref}}
pwa.cache-from=type=gha,scope=pwa-refs/heads/main
pwa.cache-to=type=gha,scope=pwa-${{github.ref}},mode=max
-
name: Start services
run: docker compose up --wait --no-build
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,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=php-${{github.ref}}
php.cache-from=type=gha,scope=php-refs/heads/main
php.cache-to=type=gha,scope=php-${{github.ref}},mode=max
pwa.cache-from=type=gha,scope=pwa-${{github.ref}}
pwa.cache-from=type=gha,scope=pwa-refs/heads/main
pwa.cache-to=type=gha,scope=pwa-${{github.ref}},mode=max
-
name: Update API Platform
run: docker compose run php composer update api-platform/core:${{ inputs.tag }}
Expand Down

0 comments on commit 707679b

Please sign in to comment.