diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml index 6193b0f..b28eb21 100644 --- a/.github/workflows/dependabot.yml +++ b/.github/workflows/dependabot.yml @@ -31,7 +31,7 @@ jobs: number: "${{ github.event.workflow_run.pull_requests[0].number }}" - name: "Merge pull request" - uses: "actions/github-script@v8" + uses: "actions/github-script@v9" with: github-token: "${{ secrets.GITHUB_TOKEN }}" script: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2aa3a1c..077dae1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,7 @@ jobs: steps: - name: Checkouting code... - uses: actions/checkout@v6 + uses: actions/checkout@v4 with: sparse-checkout: composer.json sparse-checkout-cone-mode: false @@ -36,11 +36,14 @@ jobs: run: | package_constraint=$(php -r 'echo json_decode(file_get_contents("composer.json"), true)["require"]["clean/phpdoc-md"];') php_constraint=$(composer show clean/phpdoc-md "$package_constraint" --all --format=json | php -r '$pkg = json_decode(stream_get_contents(STDIN), true); echo $pkg["requires"]["php"];') - php -r 'file_put_contents("composer.php-matrix.json", json_encode(["require" => ["php" => $argv[1]]], JSON_UNESCAPED_SLASHES));' "$php_constraint" + php -r 'file_put_contents("composer.php-matrix.json", json_encode(["require" => ["php" => $argv[1]]], JSON_UNESCAPED_SLASHES));' "${php_constraint}" 2>/dev/null + if [ ! -s composer.php-matrix.json ]; then + php -r 'file_put_contents("composer.php-matrix.json", json_encode(["require" => ["php" => "^8" ]], JSON_UNESCAPED_SLASHES));' + fi - name: Generating PHP matrix... id: php-matrix - uses: typisttech/php-matrix-action@v2 + uses: typisttech/php-matrix-action@v1 with: composer-json: composer.php-matrix.json source: php.net @@ -58,7 +61,7 @@ jobs: steps: - name: Checkouting code... - uses: actions/checkout@v6 + uses: actions/checkout@v4 - name: Detecting Composer major... id: composer-major