From 83932500efbff159bbd8a427638bda4c6559cbcf Mon Sep 17 00:00:00 2001 From: IanDelMar <42134098+IanDelMar@users.noreply.github.com> Date: Thu, 12 Oct 2023 18:19:53 +0200 Subject: [PATCH] Fix and update workflows --- .github/workflows/build.yml | 4 ++-- .github/workflows/linting.yml | 19 +++++-------------- .github/workflows/typos-check.yml | 27 +++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/typos-check.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a64d100a..0a6960f8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ on: - '**.scss' - '**.js' - 'package-lock.json' - pull_request: + pull_request_target: branches: [ develop ] paths: - '**.scss' @@ -62,7 +62,7 @@ jobs: - name: Build Bootstrap 4 CSS run: npm run css-bs4 - - name: Build Bootstrap 5 JS + - name: Build Bootstrap 4 JS run: npm run js-bs4 - name: Commit CSS and JS files diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 9678259c..9ef0103a 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -8,7 +8,7 @@ on: - 'phpcs.xml.dist' - 'phpmd.xml' - 'phpstan.neon.dist' - pull_request: + pull_request_target: branches: [ develop ] paths: - '**.php' @@ -20,6 +20,10 @@ on: env: php-version: '7.4' +concurrency: + group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' + cancel-in-progress: true + jobs: phpcs: @@ -163,16 +167,3 @@ jobs: with: commit_message: Update PHPMD basefile branch: ${{ github.head_ref }} - - typos-check: - - name: 'Typos check' - - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Search for misspellings - uses: crate-ci/typos@master diff --git a/.github/workflows/typos-check.yml b/.github/workflows/typos-check.yml new file mode 100644 index 00000000..0e82150c --- /dev/null +++ b/.github/workflows/typos-check.yml @@ -0,0 +1,27 @@ +name: Typos Check + +on: + push: + branches: [ develop ] + pull_request: + branches: [ develop ] + workflow_dispatch: + +concurrency: + group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' + cancel-in-progress: true + +jobs: + + typos-check: + + name: 'Typos check' + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Search for misspellings + uses: crate-ci/typos@master