Skip to content

Commit aaa7f88

Browse files
committed
refactor: using dorny/paths-filter action
1 parent 06eace5 commit aaa7f88

1 file changed

Lines changed: 15 additions & 7 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ on:
55
branches: [dev, main, feat/ci-cd]
66

77
jobs:
8+
changes:
9+
runs-on: ubuntu-latest
10+
outputs:
11+
logic-system: ${{ steps.filter.outputs.logic-system }}
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: dorny/paths-filter@v2
15+
id: filter
16+
with:
17+
filters: |
18+
logic-system:
19+
- 'apps/logic-system/**/*.ts'
20+
821
deploy:
922
runs-on: ubuntu-latest
1023
container: ghcr.io/railwayapp/cli:latest
@@ -13,12 +26,7 @@ jobs:
1326
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
1427
steps:
1528
- uses: actions/checkout@v3
16-
- id: modified
17-
uses: pheel/path-watcher-action@v1
18-
with:
19-
github_token: ${{ secrets.GITHUB_TOKEN }}
20-
paths: "apps/logic-system/**/*.ts"
21-
return_files: true
29+
2230
# - name: Determine environment
2331
# id: env
2432
# run: |
@@ -30,4 +38,4 @@ jobs:
3038
- name: Deploy triggers
3139
# if: steps.modified.outputs.modified == 'true'
3240
# run: railway up -s logic-system -e ${{ steps.env.outputs.environment }} --ci -d
33-
run: echo ${{ steps.modified }}
41+
run: echo ${{ needs.changes.outputs }}

0 commit comments

Comments
 (0)