Renew #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://docs.github.com/en/actions | |
name: "Renew" | |
on: # yamllint disable-line rule:truthy | |
schedule: | |
- cron: "0 0 1 1 *" | |
jobs: | |
license: | |
name: "License" | |
runs-on: "ubuntu-latest" | |
timeout-minutes: 5 | |
strategy: | |
matrix: | |
php-version: | |
- "8.1" | |
dependencies: | |
- "locked" | |
steps: | |
- name: "Checkout" | |
uses: "actions/[email protected]" | |
with: | |
token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}" | |
- name: "Set up PHP" | |
uses: "shivammathur/[email protected]" | |
with: | |
coverage: "none" | |
extensions: "none, bcmath, ctype, curl, dom, intl, json, mbstring, pdo, pdo_sqlite, phar, simplexml, tokenizer, xml, xmlwriter" | |
php-version: "${{ matrix.php-version }}" | |
- name: "Set up problem matchers for PHP" | |
run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\"" | |
- name: "Validate composer.json and composer.lock" | |
run: "composer validate --ansi --strict" | |
- name: "Determine composer cache directory" | |
uses: "ergebnis/.github/actions/composer/[email protected]" | |
- name: "Cache dependencies installed with composer" | |
uses: "actions/[email protected]" | |
with: | |
path: "${{ env.COMPOSER_CACHE_DIR }}" | |
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}" | |
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" | |
- name: "Install ${{ matrix.dependencies }} dependencies with composer" | |
uses: "ergebnis/.github/actions/composer/[email protected]" | |
with: | |
dependencies: "${{ matrix.dependencies }}" | |
- name: "Create cache directory for friendsofphp/php-cs-fixer" | |
run: "mkdir -p .build/php-cs-fixer" | |
- name: "Cache cache directory for friendsofphp/php-cs-fixer" | |
uses: "actions/[email protected]" | |
with: | |
path: ".build/php-cs-fixer" | |
key: "php-${{ matrix.php-version }}-php-cs-fixer-${{ github.ref_name }}" | |
restore-keys: | | |
php-${{ matrix.php-version }}-php-cs-fixer-main | |
php-${{ matrix.php-version }}-php-cs-fixer- | |
- name: "Run friendsofphp/php-cs-fixer" | |
run: "vendor/bin/php-cs-fixer fix --ansi --config=.php-cs-fixer.php --diff --verbose" | |
- name: "Commit modified files" | |
uses: "stefanzweifel/[email protected]" | |
with: | |
commit_author: "ergebnis-bot <[email protected]>" | |
commit_message: "Enhancement: Update license year" | |
commit_user_email: "[email protected]" | |
commit_user_name: "ergebnis-bot" |