Skip to content

Commit

Permalink
Merge pull request #31 from tatsutakein/rt/improve-checks-workflow
Browse files Browse the repository at this point in the history
ci: changed のワークフローを workflow_call で切り分け
  • Loading branch information
tatsutakein authored Feb 28, 2024
2 parents 7bdada7 + 4a20e30 commit bf88849
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 19 deletions.
20 changes: 1 addition & 19 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/wc-changed.yml
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit bf88849

Please sign in to comment.