Skip to content

Commit

Permalink
fix composer install
Browse files Browse the repository at this point in the history
  • Loading branch information
emnbdx committed Aug 16, 2024
1 parent fc75622 commit 929d4d6
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,22 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
- name: Check if composer.json exists
id: check_files
uses: andstor/file-existence-action@v1
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
files: 'composer.json'

- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run composer install if composer.json exists
if: steps.check_files.outputs.files_exists == 'true'
env:
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{secrets.COMPOSER_AUTH}}"} }'
run: composer validate --no-check-publish && composer install --prefer-dist --no-progress

deploy:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 929d4d6

Please sign in to comment.