Skip to content

Commit

Permalink
Roxygen workflow improvements (#215)
Browse files Browse the repository at this point in the history
* Trigger all workflows once Roxygen updates are committed.
* Remove a false failure related to pushing the commit.
* Make sure that file removals from `man` directory are committed.

Resolves insightsengineering/idr-tasks#755


![image](https://github.com/insightsengineering/r.pkg.template/assets/59475134/373e2f7e-817d-4fcb-9fb5-91de8947d4aa)
  • Loading branch information
walkowif authored Feb 22, 2024
1 parent 6e7b4a1 commit b223462
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/roxygen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -151,13 +152,13 @@ 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} || \
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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spelling.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: >-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down

0 comments on commit b223462

Please sign in to comment.