From 4a20e30208b19cf620ef2885fd43410291ee7738 Mon Sep 17 00:00:00 2001 From: Ryo Takeuchi Date: Wed, 28 Feb 2024 22:31:39 +0900 Subject: [PATCH] =?UTF-8?q?ci:=20changed=20=E3=81=AE=E3=83=AF=E3=83=BC?= =?UTF-8?q?=E3=82=AF=E3=83=95=E3=83=AD=E3=83=BC=E3=82=92=20workflow=5Fcall?= =?UTF-8?q?=20=E3=81=A7=E5=88=87=E3=82=8A=E5=88=86=E3=81=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/checks.yml | 20 +------------------- .github/workflows/wc-changed.yml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/wc-changed.yml 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'