Skip to content

Commit

Permalink
Prune docker cache every month
Browse files Browse the repository at this point in the history
As otherwise it'll grow in size
satackey/action-docker-layer-caching#55
  • Loading branch information
eronisko committed Feb 24, 2022
1 parent 843690f commit e705757
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,18 @@ jobs:
run: cp .env.example .env
- name: Warm up stack (and pull images to prevent them from being cached)
run: docker-compose up -d mysql elasticsearch redis
# https://github.com/satackey/action-docker-layer-caching/issues/55#issuecomment-763418185
- name: Set MONTH var for cache key
run: echo "MONTH=$(date +%m)" >> $GITHUB_ENV
- uses: satackey/[email protected]
# Ignore the failure of a step and avoid terminating the job.
# https://github.com/satackey/action-docker-layer-caching#docker-compose
continue-on-error: true
with:
key: ${{ github.workflow }}-${{ env.MONTH }}-{hash}
restore-keys: |
${{ github.workflow }}-${{ env.MONTH }}-
- name: Build docker image
run: docker-compose build php
run: docker-compose build php
- name: Test
run: docker-compose run -e MIX_SKIP_CSS_URL_PROCESSING=1 php bash -c "npm run production && vendor/bin/phpunit"

0 comments on commit e705757

Please sign in to comment.