From eba4fab44b8a2e0ac9d53b4fa4be439ca0da2e0e Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Thu, 11 May 2023 11:35:34 +0000 Subject: [PATCH] Update github action config --- .github/workflows/coding-standards.yml | 41 ++++++++++++++++++++++ .github/workflows/issues.yml | 12 +++++++ .github/workflows/pull-requests.yml | 12 +++++++ .github/workflows/{build.yml => tests.yml} | 0 .github/workflows/update-changelog.yml | 9 +++++ CHANGLOG.md => CHANGELOG.md | 0 6 files changed, 74 insertions(+) create mode 100644 .github/workflows/coding-standards.yml create mode 100644 .github/workflows/issues.yml create mode 100644 .github/workflows/pull-requests.yml rename .github/workflows/{build.yml => tests.yml} (100%) create mode 100644 .github/workflows/update-changelog.yml rename CHANGLOG.md => CHANGELOG.md (100%) 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