@@ -92,18 +92,22 @@ jobs:
92
92
mv /tmp/rv32emu-system-demo/rv32emu.wasm ./system
93
93
mv /tmp/rv32emu-system-demo/rv32emu.worker.js ./system
94
94
- name : Commit files
95
+ id : commit
95
96
if : ${{ steps.changed-files.outputs.any_modified == 'true' ||
96
97
github.event_name == 'workflow_dispatch' ||
97
98
(github.event_name == 'repository_dispatch' && github.event.action == 'deploy_system_wasm') }}
98
99
run : |
99
100
git config --local user.email "github-actions[bot]@users.noreply.github.com"
100
101
git config --local user.name "github-actions[bot]"
101
102
git add system/
102
- git commit -m "Add changes to system emulation"
103
+ if git diff --cached --quiet; then
104
+ echo "committed=false" >> $GITHUB_OUTPUT
105
+ else
106
+ git commit -m "Add changes to system emulation"
107
+ echo "committed=true" >> $GITHUB_OUTPUT
108
+ fi
103
109
- name : Push changes
104
- if : ${{ steps.changed-files.outputs.any_modified == 'true' ||
105
- github.event_name == 'workflow_dispatch' ||
106
- (github.event_name == 'repository_dispatch' && github.event.action == 'deploy_system_wasm') }}
110
+ if : steps.commit.outputs.committed == 'true'
107
111
uses : ad-m/github-push-action@master
108
112
with :
109
113
repository : sysprog21/rv32emu-demo
@@ -184,18 +188,22 @@ jobs:
184
188
mv /tmp/rv32emu-demo/rv32emu.wasm .
185
189
mv /tmp/rv32emu-demo/rv32emu.worker.js .
186
190
- name : Commit files
191
+ id : commit
187
192
if : ${{ steps.changed-files.outputs.any_modified == 'true' ||
188
193
github.event_name == 'workflow_dispatch' ||
189
194
(github.event_name == 'repository_dispatch' && github.event.action == 'deploy_user_wasm') }}
190
195
run : |
191
196
git config --local user.email "github-actions[bot]@users.noreply.github.com"
192
197
git config --local user.name "github-actions[bot]"
193
198
git add --all
194
- git commit -m "Add changes to user emulation"
199
+ if git diff --cached --quiet; then
200
+ echo "committed=false" >> $GITHUB_OUTPUT
201
+ else
202
+ git commit -m "Add changes to user emulation"
203
+ echo "committed=true" >> $GITHUB_OUTPUT
204
+ fi
195
205
- name : Push changes
196
- if : ${{ steps.changed-files.outputs.any_modified == 'true' ||
197
- github.event_name == 'workflow_dispatch' ||
198
- (github.event_name == 'repository_dispatch' && github.event.action == 'deploy_user_wasm') }}
206
+ if : steps.commit.outputs.committed == 'true'
199
207
uses : ad-m/github-push-action@master
200
208
with :
201
209
repository : sysprog21/rv32emu-demo
0 commit comments