brandon14/fossabot-commander

View on GitHub
.github/workflows/php-cs-fixer.yml

Summary

Maintainability
Test Coverage
name: php-cs-fixer

on:
  push:
    branches-ignore:
      - main
      - 1.0-dev
      - gh-pages

jobs:
  php-cs-fixer:
    runs-on: ubuntu-latest
    permissions:
      # Give the default GITHUB_TOKEN write permission to commit and push the
      # added or changed files to the repository.
      contents: write

    steps:
      - name: Checkout code
        uses: actions/checkout@v4
        with:
          ref: ${{ github.head_ref }}

      - name: Run PHP CS Fixer
        uses: docker://oskarstark/php-cs-fixer-ga
        with:
          args: --config=.php-cs-fixer.dist.php --allow-risky=yes

      - name: Import GPG key
        uses: crazy-max/ghaction-import-gpg@v6
        with:
          gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
          passphrase: ${{ secrets.PASSPHRASE }}
          git_user_signingkey: true
          git_commit_gpgsign: true

      - name: Commit changes
        uses: stefanzweifel/git-auto-commit-action@v5
        with:
          commit_message: "chore: Fix styling from PHP-CS-Fixer"
          commit_user_name: brandon14
          commit_user_email: brandon14125@gmail.com
          commit_options: '-S'