diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f889f2..d6b8d64 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,6 +20,7 @@ jobs: steps: - uses: actions/checkout@v4 + - run: echo ${{ github.event.repository.name }} - run: echo "TAG=${{ hashFiles(format('.docker/php{0}.Dockerfile', matrix.php)) }}" >> $GITHUB_ENV - uses: docker/login-action@v3 with: @@ -29,28 +30,20 @@ jobs: - run: | docker pull ${{ env.REGISTRY }}/${{ github.actor }}/belongs-to-through/php${{ matrix.php }}:${{ env.TAG }} continue-on-error: true -# env: -# TAG: ${{ hashFiles(format('.docker/php{0}.Dockerfile', matrix.php)) }} id: pull - run: | docker compose build php${{ matrix.php }} docker tag belongs-to-through-php${{ matrix.php }} ${{ env.REGISTRY }}/${{ github.actor }}/belongs-to-through/php${{ matrix.php }}:${{ env.TAG }} docker push ${{ env.REGISTRY }}/${{ github.actor }}/belongs-to-through/php${{ matrix.php }}:${{ env.TAG }} -# env: -# TAG: ${{ hashFiles(format('.docker/php{0}.Dockerfile', matrix.php)) }} if: steps.pull.outcome != 'success' - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.cache/composer/files key: php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} - run: docker compose -f docker-compose.ci.yml run --rm php${{ matrix.php }} composer update --no-interaction --no-progress --prefer-dist --prefer-${{ matrix.release }} -# env: -# TAG: ${{ hashFiles(format('.docker/php{0}.Dockerfile', matrix.php)) }} - run: | PHPUNIT_FLAGS=$([ "${{ matrix.coverage }}" == "xdebug" ] && echo "--coverage-clover=coverage.xml" || echo "") docker compose -f docker-compose.ci.yml run --rm php${{ matrix.php }} vendor/bin/phpunit $PHPUNIT_FLAGS -# env: -# TAG: ${{ hashFiles(format('.docker/php{0}.Dockerfile', matrix.php)) }} - uses: codecov/codecov-action@v3 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}