diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml new file mode 100644 index 0000000..b39bcba --- /dev/null +++ b/.github/workflows/coding-standards.yml @@ -0,0 +1,41 @@ +name: fix code styling + +on: + workflow_call: + inputs: + php: + default: "8.1" + type: string + message: + default: Fix code styling + type: string + fix: + default: true + type: boolean + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ inputs.php }} + extensions: json, dom, curl, libxml, mbstring + coverage: none + + - name: Install PHP CS + run: composer global require squizlabs/php_codesniffer + + - name: Run Phpcbf + run: phpcbf --standard=psr11 --tab-width=4 --severity=4 + + - name: Commit linted files + if: ${{ inputs.fix }} + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: ${{ inputs.message }} diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml new file mode 100644 index 0000000..ab84f3a --- /dev/null +++ b/.github/workflows/issues.yml @@ -0,0 +1,12 @@ +name: issues + +on: + issues: + types: [labeled] + +permissions: + issues: write + +jobs: + help-wanted: + uses: bowphp/.github/.github/workflows/issues.yml@main diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml new file mode 100644 index 0000000..1bc67d3 --- /dev/null +++ b/.github/workflows/pull-requests.yml @@ -0,0 +1,12 @@ +name: pull requests + +on: + pull_request_target: + types: [opened] + +permissions: + pull-requests: write + +jobs: + uneditable: + uses: bowphp/.github/.github/workflows/pull-requests.yml@main diff --git a/.github/workflows/build.yml b/.github/workflows/tests.yml similarity index 100% rename from .github/workflows/build.yml rename to .github/workflows/tests.yml diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml new file mode 100644 index 0000000..1c8b5d5 --- /dev/null +++ b/.github/workflows/update-changelog.yml @@ -0,0 +1,9 @@ +name: update changelog + +on: + release: + types: [released] + +jobs: + update: + uses: bowphp/.github/.github/workflows/update-changelog.yml@main diff --git a/CHANGLOG.md b/CHANGELOG.md similarity index 100% rename from CHANGLOG.md rename to CHANGELOG.md