github-actions-report-lcov
github-actions-report-lcov copied to clipboard
Support custom Pull Request number
In our case, we have to handle every push
on the PR instead of pull_request
.
This PR adds pr-number
, so we can do like the following workflow:
name: CI
on: [push]
jobs:
test:
runs-on: ubuntu-18.04
steps:
- ......
- uses: jwalton/gh-find-current-pr@v1
id: findPR
with:
state: open
- uses: kanga333/[email protected]
name: Hide outdated bot comments
if: success() && steps.findPR.outputs.number
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
issue_number: ${{ steps.findPR.outputs.number }}
- name: Report code coverage
uses: jhen0409/github-actions-report-lcov@main
if: success() && steps.findPr.outputs.number
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
coverage-files: ./coverage/lcov.info
artifact-name: coverage-root
pr-number: ${{ steps.findPR.outputs.number }}
Or we might be able to use it with workflow_dispatch
.
Thanks for this! Please update the readme further. "Number of the Pull Request. Optional." is vague and doesn't explain why someone would want to set this input.
Thanks for the update. I'll keep this open since, upon review, it is closely related to #22 and #25
Hi @jhen0409! Thank you again for this. I've made some modifications that I'd like you to test before we merge to main
.