Skip to content

Commit

Permalink
Update automation.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Nathanael Esayeas <[email protected]>
  • Loading branch information
ghostwriter committed Jul 31, 2023
1 parent 641f5db commit 9892bdb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,27 +71,30 @@ jobs:
restore-keys: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ matrix.dependency }}-

- name: Validate composer.json file
working-directory: ${{ github.workspace }}
run: |
if [ ! -f "${GITHUB_WORKSPACE}/composer.json" ]; then
if [ ! -f "composer.json" ]; then
echo "composer.json does not exist"
exit 1
fi
composer validate --no-check-publish --no-check-lock --no-interaction --ansi --working-dir=${GITHUB_WORKSPACE} --strict
- name: Install ${{ matrix.dependency }} dependencies
working-directory: ${{ github.workspace }}
run: |
composerCommand = 'update';
composerDependency="${{ matrix.dependency }}"
composerCommand="update"
composerOptions=("--no-interaction" "--no-progress" "--ansi" "--working-dir=${GITHUB_WORKSPACE}")
case "${matrix.dependency}" in
case ${composerDependency} in
highest) composerCommand="update" ;;
lowest) composerOptions+=("--prefer-lowest" "--prefer-stable") ;;
*) composerCommand="install" ;;
esac
# Use the `update` if there is a composer.lock file
if [ ! -f "${GITHUB_WORKSPACE}/composer.lock" ]; then
if [ ! -f "composer.lock" ]; then
composerCommand="update"
fi
Expand Down

0 comments on commit 9892bdb

Please sign in to comment.