From dd8b4def4482b09e5aea49683f6954551250bb30 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Tue, 6 Aug 2024 18:42:26 -0400 Subject: [PATCH] WIP --- .github/workflows/credit.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/credit.yml b/.github/workflows/credit.yml index 9f60b973bcb..74be5a77591 100644 --- a/.github/workflows/credit.yml +++ b/.github/workflows/credit.yml @@ -9,7 +9,7 @@ on: # yamllint disable-line rule:truthy - main permissions: - contents: write + pull-requests: write jobs: update_credit: @@ -25,8 +25,13 @@ jobs: - run: GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} python tools/dev/update_credit_json.py - run: python tools/dev/update_credit_rst.py - run: git add -f doc/sphinxext/prs/*.json - - run: echo "porcelain=$(git status --porcelain)" | tee $GITHUB_OUTPUT + - run: | + git status --porcelain + if [[ $(git status --porcelain) ]]; then + echo "dirty=true" >> $GITHUB_OUTPUT + fi id: status - run: | + git commit -am "MAINT: Update code credit" gh pr create -B main -H credit --title "MAINT: Update code credit" --body "Created by ${{ github.workflow.file }}" --label "no-changelog-entry-needed" - if: steps.status.outputs.porcelain != '' + if: steps.status.outputs.dirty == 'true'