From fb19dc8ec33a09a81a6a464bb6937441c7534f73 Mon Sep 17 00:00:00 2001 From: Benjamin Walker Date: Thu, 6 Jun 2024 09:57:21 +1000 Subject: [PATCH] feat: Add option to set custom ignore paths --- .github/workflows/ci.yml | 11 +++++++++++ README.md | 1 + 2 files changed, 12 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dfe3c5f..61994ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,6 +56,10 @@ on: description: 'Specify the minimum version of PHP to test against. Will exclude workflows using older versions of PHP.' type: string default: '7.1' + ignore_paths: + description: 'Specify custom paths for CI to ignore. Third party libraries are ignored by default.' + type: string + default: '' secrets: moodle_org_token: required: false @@ -190,6 +194,13 @@ jobs: --health-timeout 5s --health-retries 3 steps: + - name: Set custom environment variables + run: | + USER_IGNORE_PATHS="${{ inputs.ignore_paths }}" + if [ -n "${USER_IGNORE_PATHS}" ]; then + IGNORE_PATHS="${IGNORE_PATHS},${USER_IGNORE_PATHS}" + echo "IGNORE_PATHS=${IGNORE_PATHS}" >> $GITHUB_ENV + fi - name: Check out CI code uses: actions/checkout@v3 with: diff --git a/README.md b/README.md index d20424c..1513b30 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,7 @@ Below lists the available inputs which are _all optional_: | release_branches | Name of the non-standardly named branch which should run the release job | | moodle_branches | Specify the MOODLE_XX_STABLE branch you specifically want to test against. This is _not_ recommended, and instead you should configuring a supported range. | | min_php | The minimum php version to test. Set this to support the minimum php version supported by the plugin. Defaults to '7.1', however more recent Moodle branches only test higher versions. | +| ignore_paths | Specify custom paths for CI to ignore. Third party libraries are ignored by default. | ### Add CI badge