Skip to content

Commit 3aa8e95

Browse files
committed
detect changed
1 parent 774a6fa commit 3aa8e95

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/test-changed-firestore.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ jobs:
1010
name: Build Firestore
1111

1212
runs-on: ubuntu-latest
13+
outputs:
14+
changed: ${{ steps.set-output.outputs.CHANGED }}
1315

1416
steps:
1517
- name: Checkout Repo
@@ -32,11 +34,17 @@ jobs:
3234
cp config/ci.config.json config/project.json
3335
yarn
3436
- name: build
35-
run: yarn build:changed firestore
37+
id: build
38+
run: yarn build:changed firestore | egrep "Skipping all"
39+
# Only continue when "Skipping all is not found"
40+
continue-on-error: true
41+
- name: set output
42+
id: set-output
43+
run: echo "CHANGED=true" >> "$GITHUB_OUTPUT";
3644
- name: Archive build
3745
if: ${{ !cancelled() }}
3846
run: |
39-
tar -cf build.tar --exclude="\.git" --exclude="node_modules".
47+
tar -cf build.tar --exclude="\.git" --exclude="node_modules" .
4048
gzip build.tar
4149
- name: Upload build archive
4250
if: ${{ !cancelled() }}
@@ -52,6 +60,7 @@ jobs:
5260
runs-on: ubuntu-latest
5361

5462
needs: build
63+
if: ${{ needs.build.outputs.changed == 'true'}}
5564
steps:
5665
- name: Set up Node (14)
5766
uses: actions/setup-node@v3
@@ -84,6 +93,7 @@ jobs:
8493
runs-on: ubuntu-latest
8594

8695
needs: build
96+
if: ${{ needs.build.outputs.changed == 'true'}}
8797
steps:
8898
- name: Set up Node (14)
8999
uses: actions/setup-node@v3
@@ -119,6 +129,7 @@ jobs:
119129
runs-on: ubuntu-20.04
120130

121131
needs: build
132+
if: ${{ needs.build.outputs.changed == 'true'}}
122133
steps:
123134
- name: install Firefox stable
124135
run: |

0 commit comments

Comments
 (0)