New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.github: Create lint-rst.yaml #16387
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
As I understand GH Actions triggers, workflow_dispatch
is a manually triggered event (https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch) and we would like to run this on all PRs (possibly marking it as required for merging a PR).
Please take a look at https://github.com/cilium/cilium/blob/master/.github/workflows/lint-bpf-checks.yaml as an example.
Edit: sorry, I misread your initial PR comment. I still think we should run this on PRs rather than on stable branch pushes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes! One more change request and I think we're good to go here.
This is a Github workflow for automatic checking and catching malformed RST files on PRs. It can also be manually triggered from the Github Actions UI for testing with the following options: - rstcheck report type - RST files to find - Paths to find Fixes: cilium#13366 Signed-off-by: Geyslan G. Bem <geyslan@accuknox.com>
Done! Force pushed. Thanks @nebril |
@twpayne I think the issue https://github.com/cilium/cilium/actions/runs/1000552313 is related to pull requests of new branches from witch we can't have SHA in A solution would be to use |
Thanks for investigating! So, if I understand correctly, line number 49:
should be replaced with
Similarly, line 24, currently: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.after }} should be replaced with: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.pull_request.base.sha }} Is this correct? |
I'm not sure I understand, what does this PR brings that b381918 did not? |
I did some tests by sending PRs to my forked cilium. https://github.com/geyslan/cilium/runs/2991422456?check_suite_focus=true It seemed to work changing, as you proposed, line number 24 to: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.pull_request.base.sha }} and line 49 to: git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep '\.rst$' >> $GITHUB_ENV The documentation states that |
This is a Github workflow for automatic checking and catching malformed
RST files on pushes.
It can also be manually triggered from the Github Actions UI for testing
with the following options:
Fixes: #13366
Signed-off-by: Geyslan G. Bem geyslan@accuknox.com