From 5afa9232b43bc34c8b4650fb5283d8ff101737ef Mon Sep 17 00:00:00 2001 From: Franciszek Walkowiak Date: Thu, 22 Feb 2024 17:05:26 +0100 Subject: [PATCH 1/4] Roxygen workflow improvements --- .github/workflows/roxygen.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/roxygen.yaml b/.github/workflows/roxygen.yaml index 64dfa02f..4f01871b 100644 --- a/.github/workflows/roxygen.yaml +++ b/.github/workflows/roxygen.yaml @@ -151,8 +151,8 @@ jobs: echo "Regenerating man pages via auto-update" git config --global user.name "github-actions" git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - git add man/* DESCRIPTION - git commit -m "[skip actions] Roxygen Man Pages Auto Update" + git add -A man/ DESCRIPTION + git commit -m "Roxygen Man Pages Auto Update" BRANCH_NAME="${{ steps.branch-name.outputs.head_ref_branch }}" git pull origin ${BRANCH_NAME} git push -v origin HEAD:${BRANCH_NAME} || \ From 01a9d37361aff440cd5bdb74fa649aec9cf23721 Mon Sep 17 00:00:00 2001 From: Franciszek Walkowiak Date: Thu, 22 Feb 2024 17:36:28 +0100 Subject: [PATCH 2/4] Don't set AUTO_UPDATE to failed if git push didn't fail --- .github/workflows/roxygen.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/roxygen.yaml b/.github/workflows/roxygen.yaml index 4f01871b..b14a5943 100644 --- a/.github/workflows/roxygen.yaml +++ b/.github/workflows/roxygen.yaml @@ -156,8 +156,8 @@ jobs: BRANCH_NAME="${{ steps.branch-name.outputs.head_ref_branch }}" git pull origin ${BRANCH_NAME} git push -v origin HEAD:${BRANCH_NAME} || \ - echo "⚠️ Could not push to ${BRANCH_NAME} on $(git remote -v show -n origin | grep Push)" && \ - AUTO_UPDATE=failed + (echo "⚠️ Could not push to ${BRANCH_NAME} on $(git remote -v show -n origin | grep Push)" && \ + AUTO_UPDATE=failed) } fi # If auto-update is disabled or is unsuccessful, let 'em know to fix manually From f7ed4655dfbbd054c503e3bd3bf2d921af210ea5 Mon Sep 17 00:00:00 2001 From: Franciszek Walkowiak Date: Thu, 22 Feb 2024 17:41:40 +0100 Subject: [PATCH 3/4] Actually use REPO_GITHUB_TOKEN to commit changes --- .github/workflows/roxygen.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/roxygen.yaml b/.github/workflows/roxygen.yaml index b14a5943..f3845b21 100644 --- a/.github/workflows/roxygen.yaml +++ b/.github/workflows/roxygen.yaml @@ -85,6 +85,7 @@ jobs: ref: ${{ steps.branch-name.outputs.head_ref_branch }} path: ${{ github.event.repository.name }} repository: ${{ github.event.pull_request.head.repo.full_name }} + token: ${{ steps.github-token.outputs.token }} - name: Checkout repo 🛎 uses: actions/checkout@v4 From d1df0ffe9aec13c552567ffd492509a92fef7ce0 Mon Sep 17 00:00:00 2001 From: Franciszek Walkowiak Date: Thu, 22 Feb 2024 18:08:28 +0100 Subject: [PATCH 4/4] Update commit messages --- .github/workflows/spelling.yaml | 2 +- .github/workflows/style.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/spelling.yaml b/.github/workflows/spelling.yaml index 305a8773..28707e8e 100644 --- a/.github/workflows/spelling.yaml +++ b/.github/workflows/spelling.yaml @@ -112,7 +112,7 @@ jobs: if: github.event_name == 'push' uses: stefanzweifel/git-auto-commit-action@v5 with: - commit_message: "[skip actions] Update WORDLIST" + commit_message: "Update WORDLIST" file_pattern: "${{ steps.file-pattern.outputs.file-pattern }}" commit_user_name: github-actions commit_user_email: >- diff --git a/.github/workflows/style.yaml b/.github/workflows/style.yaml index cb3cb2d3..500c9296 100644 --- a/.github/workflows/style.yaml +++ b/.github/workflows/style.yaml @@ -120,7 +120,7 @@ jobs: git config --global user.name 'github-actions' git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' git add ${{ steps.problem-files.outputs.unstyled-files }} - git commit -m '[skip actions] Restyle files' + git commit -m 'Restyle files' git pull origin ${{ steps.branch-name.outputs.head_ref_branch }} git push -v origin HEAD:${{ steps.branch-name.outputs.head_ref_branch }} || \ echo "⚠️ Could not push to ${BRANCH_NAME} on $(git remote -v show -n origin | grep Push)"