Skip to content

Commit

Permalink
reset image cache 1/month
Browse files Browse the repository at this point in the history
  • Loading branch information
sshilko committed Jan 2, 2024
1 parent e41381f commit f0e58b6
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/php74-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,16 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Set build date for cache expiry
id: date
run: echo "::set-output name=date::$(date +'%Y-%m')"

- name: Cache Docker php-image
id: docker-php-image-cache
uses: actions/cache@v3
with:
path: /tmp/docker-save
key: ${{ runner.os }}-docker-php-build-save-${{ hashFiles('/build/Dockerfile.php.common', '/build/Dockerfile.php74') }}
key: ${{ runner.os }}-docker-php-build-save-${{ hashFiles('/build/Dockerfile.php.common', '/build/Dockerfile.php74') }}-${{ steps.date.outputs.date }}

- name: Load cached Docker image
run: docker load -i /tmp/docker-save/snapshot.tar || true
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/phpdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,17 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set build date for cache expiry
id: date
run: echo "::set-output name=date::$(date +'%Y-%m')"

- name: Load cached app docker image
id: docker-php-image-cache
uses: actions/cache@v3
with:
path: /tmp/docker-save
key: ${{ runner.os }}-docker-php-build-save-${{ hashFiles('/build/Dockerfile.php.common', '/build/Dockerfile.php74') }}
key: ${{ runner.os }}-docker-php-build-save-${{ hashFiles('/build/Dockerfile.php.common', '/build/Dockerfile.php74') }}-${{ steps.date.outputs.date }}

- name: Load cached Docker image
run: docker load -i /tmp/docker-save/snapshot.tar && docker tag app/php-image-cache app/php

Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/phppdepend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,17 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set build date for cache expiry
id: date
run: echo "::set-output name=date::$(date +'%Y-%m')"

- name: Load cached app docker image
id: docker-php-image-cache
uses: actions/cache@v3
with:
path: /tmp/docker-save
key: ${{ runner.os }}-docker-php-build-save-${{ hashFiles('/build/Dockerfile.php.common', '/build/Dockerfile.php74') }}
key: ${{ runner.os }}-docker-php-build-save-${{ hashFiles('/build/Dockerfile.php.common', '/build/Dockerfile.php74') }}-${{ steps.date.outputs.date }}

- name: Load cached Docker image
run: docker load -i /tmp/docker-save/snapshot.tar && docker tag app/php-image-cache app/php

Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,17 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set build date for cache expiry
id: date
run: echo "::set-output name=date::$(date +'%Y-%m')"

- name: Load cached app docker image
id: docker-php-image-cache
uses: actions/cache@v3
with:
path: /tmp/docker-save
key: ${{ runner.os }}-docker-php-build-save-${{ hashFiles('/build/Dockerfile.php.common', '/build/Dockerfile.php74') }}
key: ${{ runner.os }}-docker-php-build-save-${{ hashFiles('/build/Dockerfile.php.common', '/build/Dockerfile.php74') }}-${{ steps.date.outputs.date }}

- name: Load cached Docker image
run: docker load -i /tmp/docker-save/snapshot.tar && docker tag app/php-image-cache app/php

Expand Down

0 comments on commit f0e58b6

Please sign in to comment.