Skip to content

Commit b931e73

Browse files
committed
Restricted CI to run only when specific samples are changed
1 parent b1b1f25 commit b931e73

File tree

5 files changed

+19
-3
lines changed

5 files changed

+19
-3
lines changed

.github/workflows/samples_foundations.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ on:
44
# run it on push to the default repository branch
55
push:
66
branches: [main]
7+
paths:
8+
- "samples/foundations/**"
79
# run it during pull request
810
pull_request:
11+
paths:
12+
- "samples/foundations/**"
913

1014
defaults:
1115
run:
@@ -40,4 +44,4 @@ jobs:
4044
# run build
4145
- run: npm run build:ts
4246
# run tests
43-
- run: npm test
47+
- run: npm test

.github/workflows/samples_from_crud_to_event_sourcing.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ on:
44
# run it on push to the default repository branch
55
push:
66
branches: [main]
7+
paths:
8+
- "samples/from_crud_to_eventsourcing/**"
79
# run it during pull request
810
pull_request:
11+
paths:
12+
- "samples/from_crud_to_eventsourcing/**"
913

1014
defaults:
1115
run:

.github/workflows/samples_simple.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ on:
44
# run it on push to the default repository branch
55
push:
66
branches: [main]
7+
paths:
8+
- "samples/simple/**"
79
# run it during pull request
810
pull_request:
11+
paths:
12+
- "samples/simple/**"
913

1014
defaults:
1115
run:
@@ -68,7 +72,7 @@ jobs:
6872
registry: ghcr.io
6973
username: ${{ github.actor }}
7074
password: ${{ secrets.GITHUB_TOKEN }}
71-
75+
7276
- name: Build image and push to Docker Hub and GitHub Container Registry
7377
uses: docker/build-push-action@v3
7478
with:
@@ -82,4 +86,4 @@ jobs:
8286
push: ${{ github.ref == 'refs/heads/main' }}
8387

8488
- name: Image digest
85-
run: echo ${{ steps.docker_build.outputs.digest }}
89+
run: echo ${{ steps.docker_build.outputs.digest }}

.github/workflows/samples_snapshots.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ on:
44
# run it on push to the default repository branch
55
push:
66
branches: [main]
7+
- "samples/snapshots/**"
78
# run it during pull request
89
pull_request:
10+
- "samples/snapshots/**"
911

1012
defaults:
1113
run:

.github/workflows/samples_webinar.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ on:
44
# run it on push to the default repository branch
55
push:
66
branches: [main]
7+
- "samples/webinar/**"
78
# run it during pull request
89
pull_request:
10+
- "samples/webinar/**"
911

1012
defaults:
1113
run:

0 commit comments

Comments
 (0)