diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e28a4a6..e059f6e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,3 +18,11 @@ jobs: python-version: "3.11" - name: Test run: make -B test + - name: Update snapshot + run: | + git config user.name snapshot + git config user.email snapshot@users.noreply.github.com + git add . + if git commit -m "chore: update snapshot"; then + git push + fi diff --git a/.github/workflows/pre-commit-update.yml b/.github/workflows/pre-commit-update.yml index b76d262..88e4736 100644 --- a/.github/workflows/pre-commit-update.yml +++ b/.github/workflows/pre-commit-update.yml @@ -23,8 +23,8 @@ jobs: python-version: "3.11" - name: Configure Git run: | - git config user.name "$GITHUB_ACTOR" - git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + git config user.name pre-commit-update + git config user.email pre-commit-update@users.noreply.github.com - name: make test run: make test - name: pre-commit autoupdate diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml deleted file mode 100644 index 495e83d..0000000 --- a/.github/workflows/snapshot.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Snapshot - -on: - push: - branches: [main] - pull_request_target: - -permissions: - contents: write - actions: write - -jobs: - snapshot: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python - id: setup-python - uses: actions/setup-python@v5 - with: - python-version: "3.11" - - name: Configure Git - run: | - git config user.name "$GITHUB_ACTOR" - git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - - name: Snapshot - run: make -B snapshot - - name: Commit and push any changes - env: - GH_TOKEN: ${{ github.token }} - run: | - git add . - if git commit -m "chore: update snapshot"; then - git push - # git push won't trigger workflows so we manually do it - # see https://github.com/orgs/community/discussions/25702#discussioncomment-8650283 - gh workflow run ci.yml - fi