Skip to content

Commit

Permalink
unique caches per action
Browse files Browse the repository at this point in the history
  • Loading branch information
sshilko committed Jan 2, 2024
1 parent 6055523 commit e03255c
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- name: Set build date for cache expiry
id: date
run: echo "::set-output name=date::$(date +'%Y.%m')"
run: echo "$(date +'%Y.%m'); php81" | md5 >> >> "$GITHUB_OUTPUT"

- name: Cache Docker php-image
id: docker-php-image-cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('/composer.lock') }}-composer-dev
key: ${{ runner.os }}-php81-${{ hashFiles('composer.lock') }}-composer-dev

- name: PHP Version
run: php --version
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/phpdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- name: Set build date for cache expiry
id: date
run: echo "::set-output name=date::$(date +'%Y.%m')"
run: echo "$(date +'%Y.%m'); php81" | md5 >> >> "$GITHUB_OUTPUT"

- name: Load cached app docker image
id: docker-php-image-cache
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('/composer.lock') }}-composer-dev
key: ${{ runner.os }}-php81-${{ hashFiles('composer.lock') }}-composer-dev

- name: Docker install dependencies
run: docker-compose exec -T app.php81 composer install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpmd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('/composer.lock') }}-composer-dev
key: ${{ runner.os }}-php81-${{ hashFiles('composer.lock') }}-composer-dev

- name: PHP Version
run: php --version
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/phppdepend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- name: Set build date for cache expiry
id: date
run: echo "::set-output name=date::$(date +'%Y.%m')"
run: echo "$(date +'%Y.%m'); php81" | md5 >> >> "$GITHUB_OUTPUT"

- name: Load cached app docker image
id: docker-php-image-cache
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('/composer.lock') }}-composer-dev
key: ${{ runner.os }}-php81-${{ hashFiles('composer.lock') }}-composer-dev

- name: Docker install dependencies
run: docker-compose exec -T app.php81 composer install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpphan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('/composer.lock') }}-composer-dev
key: ${{ runner.os }}-php81-${{ hashFiles('composer.lock') }}-composer-dev

- name: PHP Version
run: php --version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phppsalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('/composer.lock') }}-composer-dev
key: ${{ runner.os }}-php81-${{ hashFiles('composer.lock') }}-composer-dev

- name: PHP Version
run: php --version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('/composer.lock') }}-composer-dev
key: ${{ runner.os }}-php81-${{ hashFiles('composer.lock') }}-composer-dev

- name: PHP Version
run: php --version
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- name: Set build date for cache expiry
id: date
run: echo "::set-output name=date::$(date +'%Y.%m')"
run: echo "$(date +'%Y.%m'); php81" | md5 >> >> "$GITHUB_OUTPUT"

- name: Load cached app docker image
id: docker-php-image-cache
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('/composer.lock') }}-composer-dev
key: ${{ runner.os }}-php81-${{ hashFiles('composer.lock') }}-composer-dev

- name: Docker install dependencies
run: docker-compose exec -T app.php81 composer install
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/phpunit80.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
uses: actions/cache@v3
with:
path: /tmp/docker-save
key: ${{ runner.os }}-docker-php-xbuild80-save-${{ hashFiles('build/Dockerfile.php.common', 'build/Dockerfile.php80') }}
key: ${{ runner.os }}-docker-php-build80-save-${{ hashFiles('build/Dockerfile.php.common', 'build/Dockerfile.php80', 'composer.lock') }}
- name: Load cached Docker image
run: docker load -i /tmp/docker-save/snapshot.tar && docker tag app/php-image-cache app/php80

Expand All @@ -94,7 +94,7 @@ jobs:
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('/composer.lock') }}-composer-dev
key: ${{ runner.os }}-php80-${{ hashFiles('composer.lock') }}-composer-dev

- name: Docker install dependencies
run: docker-compose exec -T app.php80 composer install
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/phpunit81.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: actions/cache@v3
with:
path: /tmp/docker-save
key: ${{ runner.os }}-docker-php-xbuild81-save-${{ hashFiles('build/Dockerfile.php.common', 'build/Dockerfile.php81') }}
key: ${{ runner.os }}-docker-php-xbuild81-save-${{ hashFiles('build/Dockerfile.php.common', 'build/Dockerfile.php81', 'composer.lock') }}

- name: Load cached Docker image
run: docker load -i /tmp/docker-save/snapshot.tar || true
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('/composer.lock') }}-composer-dev
key: ${{ runner.os }}-php81-${{ hashFiles('composer.lock') }}-composer-dev

- name: Docker install dependencies
run: docker-compose exec -T app.php81 composer install
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/phpunit82.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: actions/cache@v3
with:
path: /tmp/docker-save
key: ${{ runner.os }}-docker-php82-xbuild-save-${{ hashFiles('build/Dockerfile.php.common', 'build/Dockerfile.php82') }}
key: ${{ runner.os }}-docker-php82-xbuild-save-${{ hashFiles('build/Dockerfile.php.common', 'build/Dockerfile.php82', 'composer.lock') }}

- name: Load cached Docker image
run: docker load -i /tmp/docker-save/snapshot.tar || true
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('/composer.lock') }}-composer-dev
key: ${{ runner.os }}-php82-${{ hashFiles('composer.lock') }}-composer-dev

- name: Docker install dependencies
run: docker-compose exec -T app.php82 composer install
Expand Down

0 comments on commit e03255c

Please sign in to comment.