Skip to content

Commit 555905f

Browse files
build: Only run actions based on path changed filter (#19)
* build: Only run actions based on path changed filter * build: Fix medcat-service cache * build: Rename action * build: Use path matching for a PR. Run everything on main * build: Remove concurrency block
1 parent fe5388a commit 555905f

File tree

5 files changed

+23
-26
lines changed

5 files changed

+23
-26
lines changed

.github/workflows/medcat-demo-app_build.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
name: medcat-demo - Test
1+
name: medcat-demo-app - Test
22

33
on:
44
push:
55
branches: [ main ]
66
pull_request:
7-
branches: [ main ]
8-
7+
paths:
8+
- 'medcat-demo-app/**'
9+
- '.github/workflows/medcat-demo-app**'
910
defaults:
1011
run:
1112
working-directory: ./medcat-demo-app

.github/workflows/medcat-service_docker.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@ name: medcat-service - Build Images
22

33
on:
44
push:
5-
branches:
6-
- '**'
5+
branches: [ main ]
76
tags:
8-
- 'v*.*.*' # e.g., v0.1.1
7+
- 'medcat-service/v*.*.*' # e.g., medcat-serice/v0.1.1
8+
pull_request:
9+
paths:
10+
- 'medcat-service/**'
11+
- '.github/workflows/medcat-service**'
912
release:
1013
types: [published]
1114

.github/workflows/medcat-service_run-tests.yml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,20 @@
11
name: medcat-service - Test
22

33
on:
4-
54
push:
6-
branches: [ devel, main ]
5+
branches: [ main ]
76
pull_request:
8-
branches: [ devel, main ]
9-
10-
release:
11-
types: [published]
12-
13-
# Allows you to run this workflow manually from the Actions tab
14-
workflow_dispatch:
7+
paths:
8+
- 'medcat-service/**'
9+
- '.github/workflows/medcat-service**'
1510

1611
defaults:
1712
run:
1813
working-directory: ./medcat-service
1914

2015
jobs:
21-
2216
build:
23-
2417
runs-on: ubuntu-latest
25-
26-
env:
27-
working-directory: ./
28-
29-
# Steps represent a sequence of tasks that will be executed as part of the job
3018
steps:
3119
- name: checkout repo
3220
uses: actions/checkout@v2
@@ -36,7 +24,7 @@ jobs:
3624
uses: actions/cache@v4
3725
with:
3826
path: models/medmen
39-
key: medmen-${{ hashFiles('scripts/download_medmen.sh') }}
27+
key: medmen-${{ hashFiles('medcat-service/scripts/download_medmen.sh') }}
4028

4129
- name: Install Python 3
4230
uses: actions/setup-python@v5

.github/workflows/medcat-v2-tutorials_main.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ on:
44
push:
55
branches: [ main ]
66
pull_request:
7-
branches: [ main ]
8-
7+
paths:
8+
- 'medcat-v2/**'
9+
- 'medcat-v2-tutorials/**'
10+
- '.github/workflows/medcat-v2**'
11+
- '.github/workflows/medcat-v2-tutorials**'
912
defaults:
1013
run:
1114
working-directory: ./medcat-v2-tutorials

.github/workflows/medcat-v2_main.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ on:
44
push:
55
branches: [ main ]
66
pull_request:
7-
branches: [ main ]
7+
paths:
8+
- 'medcat-v2/**'
9+
- '.github/workflows/medcat-v2**'
810
defaults:
911
run:
1012
working-directory: ./medcat-v2

0 commit comments

Comments
 (0)