Update Mime Types #13
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
name: "Update Mime Types" | |
on: | |
schedule: | |
- cron: "0 10 1 */3 *" | |
workflow_dispatch: | |
jobs: | |
update: | |
name: "Update Mime Types" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
token: ${{ secrets.PAT }} | |
- name: "Install PHP" | |
uses: shivammathur/setup-php@master | |
with: | |
php-version: 8.2 | |
extensions: mbstring, | |
coverage: xdebug, | |
- name: "Validate composer.json and composer.lock" | |
run: composer validate --strict | |
- name: "Setup Composer, install dependencies" | |
uses: ramsey/composer-install@v3 | |
with: | |
composer-options: "--prefer-dist --optimize-autoloader" | |
require-lock-file: "true" | |
- name: "Run update" | |
run: composer run-script update-types | |
- name: "Run test suite" | |
run: composer run-script test | |
- name: "Coverage check" | |
run: composer run-script coverage-check | |
- name: "Import GPG key" | |
id: import-gpg | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
- name: "Commit and push changes" | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_author: "${{ steps.import-gpg.outputs.name }} <${{ steps.import-gpg.outputs.email }}>" | |
commit_user_name: ${{ steps.import-gpg.outputs.name }} | |
commit_user_email: ${{ steps.import-gpg.outputs.email }} | |
commit_message: 'chore: Update mime.types' | |
commit_options: '-S --amend --no-edit' | |
push_options: '--force' | |
skip_fetch: true |