diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 2589b9d..16a1d0a 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -11,25 +11,7 @@ concurrency: jobs: changed: - runs-on: ubuntu-22.04 - permissions: - contents: read - pull-requests: read - outputs: - actions: ${{ steps.changes.outputs.actions }} - steps: - # https://github.com/marketplace/actions/checkout - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - # https://github.com/marketplace/actions/paths-changes-filter - - name: Paths Changes Filter - uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 - id: changes - with: - filters: | - actions: - - '.github/workflows/*.yml' + uses: ./.github/workflows/wc-changed.yml check-actions: runs-on: ubuntu-22.04 diff --git a/.github/workflows/wc-changed.yml b/.github/workflows/wc-changed.yml new file mode 100644 index 0000000..206abcf --- /dev/null +++ b/.github/workflows/wc-changed.yml @@ -0,0 +1,30 @@ +name: "Check for changes in paths" + +on: + workflow_call: + outputs: + actions: + value: ${{ jobs.changes.outputs.actions }} + +permissions: + contents: read + pull-requests: read + +jobs: + changed: + runs-on: ubuntu-22.04 + outputs: + actions: ${{ steps.changes.outputs.actions }} + steps: + # https://github.com/marketplace/actions/checkout + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + # https://github.com/marketplace/actions/paths-changes-filter + - name: Paths Changes Filter + uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 + id: changes + with: + filters: | + actions: + - '.github/workflows/*.yml'