Skip to content

CI: Push wasm commit on changes only #603

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions .github/workflows/deploy-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,22 @@ jobs:
mv /tmp/rv32emu-system-demo/rv32emu.wasm ./system
mv /tmp/rv32emu-system-demo/rv32emu.worker.js ./system
- name: Commit files
id: commit
if: ${{ steps.changed-files.outputs.any_modified == 'true' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'repository_dispatch' && github.event.action == 'deploy_system_wasm') }}
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add system/
git commit -m "Add changes to system emulation"
if git diff --cached --quiet; then
echo "committed=false" >> $GITHUB_OUTPUT
else
git commit -m "Add changes to system emulation"
echo "committed=true" >> $GITHUB_OUTPUT
fi
- name: Push changes
if: ${{ steps.changed-files.outputs.any_modified == 'true' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'repository_dispatch' && github.event.action == 'deploy_system_wasm') }}
if: steps.commit.outputs.committed == 'true'
uses: ad-m/github-push-action@master
with:
repository: sysprog21/rv32emu-demo
Expand Down Expand Up @@ -184,18 +188,22 @@ jobs:
mv /tmp/rv32emu-demo/rv32emu.wasm .
mv /tmp/rv32emu-demo/rv32emu.worker.js .
- name: Commit files
id: commit
if: ${{ steps.changed-files.outputs.any_modified == 'true' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'repository_dispatch' && github.event.action == 'deploy_user_wasm') }}
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add --all
git commit -m "Add changes to user emulation"
if git diff --cached --quiet; then
echo "committed=false" >> $GITHUB_OUTPUT
else
git commit -m "Add changes to user emulation"
echo "committed=true" >> $GITHUB_OUTPUT
fi
- name: Push changes
if: ${{ steps.changed-files.outputs.any_modified == 'true' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'repository_dispatch' && github.event.action == 'deploy_user_wasm') }}
if: steps.commit.outputs.committed == 'true'
uses: ad-m/github-push-action@master
with:
repository: sysprog21/rv32emu-demo
Expand Down