Skip to content

Commit a8e9bf6

Browse files
Copilotdannystaple
andcommitted
Replace dorny/paths-filter with tj-actions/changed-files
Co-authored-by: dannystaple <426859+dannystaple@users.noreply.github.com>
1 parent fbbdb02 commit a8e9bf6

File tree

2 files changed

+22
-19
lines changed

2 files changed

+22
-19
lines changed

.github/workflows/on_pr_test.yaml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,27 +34,29 @@ jobs:
3434
detect_base_image_changes:
3535
runs-on: ubuntu-latest
3636
outputs:
37-
changed: ${{ steps.changes.outputs.base_image }}
37+
changed: ${{ steps.changes.outputs.any_changed }}
3838
steps:
3939
- uses: actions/checkout@v4
40-
40+
4141
- name: Check for base image related changes
42-
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
42+
# tj-actions/changed-files v44.5.7
43+
uses: tj-actions/changed-files@c65cd883420fd2eb864698a825fc4162dd94482c
4344
id: changes
4445
with:
45-
filters: |
46-
base_image:
47-
- 'Dockerfile'
48-
- 'package.json'
49-
- 'package-lock.json'
50-
- '.github/workflows/on_call_build_site.yaml'
51-
- '.github/workflows/on_pr_test.yaml'
46+
files: |
47+
Dockerfile
48+
package.json
49+
package-lock.json
50+
.github/workflows/on_call_build_site.yaml
51+
.github/workflows/on_pr_test.yaml
5252
5353
build_site:
5454
needs: detect_base_image_changes
5555
uses: ./.github/workflows/on_call_build_site.yaml
5656
with:
57-
push_tag: ${{ needs.detect_base_image_changes.outputs.changed == 'true' && github.event.number || '' }}
57+
push_tag: >-
58+
${{ needs.detect_base_image_changes.outputs.changed == 'true'
59+
&& github.event.number || '' }}
5860
5961
staging_test:
6062
uses: ./.github/workflows/on_call_staging_test.yaml

.github/workflows/on_push_to_master_test_and_deploy.yaml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,13 @@ jobs:
8787

8888
- uses: actions/checkout@v4
8989

90-
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
90+
- name: Check for workflow changes
91+
# tj-actions/changed-files v44.5.7
92+
uses: tj-actions/changed-files@c65cd883420fd2eb864698a825fc4162dd94482c
9193
id: filter
9294
with:
93-
filters: |
94-
workflows:
95-
- '.github/workflows/**'
95+
files: |
96+
.github/workflows/**
9697
9798
# see https://github.com/mcdeck/netlify-cms-oauth-provider-php
9899
- name: Checkout the netlify-cms-oauth-provider-php
@@ -102,13 +103,13 @@ jobs:
102103
path: netlify-cms-oauth-provider-php
103104

104105
- name: Perform the netlify composer install
105-
if: steps.filter.outputs.workflows == 'true'
106+
if: steps.filter.outputs.any_changed == 'true'
106107
run: |
107108
cd netlify-cms-oauth-provider-php
108109
composer install
109110
110111
- name: Copy over the netlify-cms-oauth-provider-php files
111-
if: steps.filter.outputs.workflows == 'true'
112+
if: steps.filter.outputs.any_changed == 'true'
112113
uses: burnett01/rsync-deployments@3cccb6851148e6198ed9ed89eb0d1c17b5e58cc7 # v7.0.2
113114
with:
114115
switches: -a
@@ -119,7 +120,7 @@ jobs:
119120
remote_key: ${{ secrets.ORIONROBOTS_DEPLOY_KEY }}
120121

121122
- name: Create the oauth environment file
122-
if: steps.filter.outputs.workflows == 'true'
123+
if: steps.filter.outputs.any_changed == 'true'
123124
run: |
124125
(
125126
echo "OAUTH_CLIENT_ID=${{ secrets.ORIONROBOTS_OAUTH_CLIENT_ID }}"
@@ -130,7 +131,7 @@ jobs:
130131
) > netlify-cms-oauth-provider-php/.env.local
131132
132133
- name: Copy over the oauth environment file
133-
if: steps.filter.outputs.workflows == 'true'
134+
if: steps.filter.outputs.any_changed == 'true'
134135
uses: burnett01/rsync-deployments@3cccb6851148e6198ed9ed89eb0d1c17b5e58cc7 # v7.0.2
135136
with:
136137
switches: -a

0 commit comments

Comments
 (0)