From c112403930a61b328e1b2e869059ae27698d36cc Mon Sep 17 00:00:00 2001 From: Oliver Mannion <125105+tekumara@users.noreply.github.com> Date: Sun, 14 Jul 2024 21:51:44 +1000 Subject: [PATCH] . --- .github/workflows/ci.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4775d62..e2940cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,21 +6,29 @@ on: pull_request_target: workflow_dispatch: +permissions: + # for update snapshots + contents: write + jobs: ci: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + # make sure we have a branch when triggered by pull_request (ie: avoids a detached HEAD) + ref: ${{ github.head_ref }} - name: Set up Python id: setup-python uses: actions/setup-python@v5 - name: Test run: make -B test - - name: Update snapshot + - name: Update snapshots run: | - git config user.name snapshot - git config user.email snapshot@users.noreply.github.com + git config user.name snapshots + git config user.email snapshots@users.noreply.github.com + git status git add . - if git commit -m "chore: update snapshot"; then + if git commit -m "chore: update snapshots"; then git push fi