Skip to content

Commit

Permalink
chore: add bot command /snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
StoneDot committed Oct 7, 2023
1 parent cc20dab commit 8ed0b37
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
on:
issue_comment:
types: [created, edited]

name: bot

jobs:
pr_commented:
# This job only runs for pull request comments
name: PR comment
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/snapshot') }}
strategy:
# Do not run in parallel because we may create a new commit
max-parallel: 1
matrix:
name: [windows, linux]
include:
- name: windows
os: windows-latest
- name: linux
os: ubuntu-latest
runs-on: ${{ matrix.os }}
env:
# Set TRYCMD=overwrite to update snapshot
TRYCMD: overwrite
steps:
- uses: actions/checkout@v2
- uses: actions-rs/cargo@v1
# Generate new snapshots
with:
command: test
args: cli_tests
- run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "test: update snapshot for ${{ matrix.name }}"
git push

0 comments on commit 8ed0b37

Please sign in to comment.