-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement safe workflow secrets access
- Loading branch information
Showing
2 changed files
with
91 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: code coverage | ||
|
||
on: | ||
workflow_run: | ||
workflows: | ||
- build | ||
types: | ||
- completed | ||
|
||
jobs: | ||
code-climate: | ||
name: Send code coverage report to Code Climate | ||
runs-on: ubuntu-latest | ||
if: > | ||
( | ||
( | ||
github.event.workflow_run.event == 'pull_request' || | ||
github.event.workflow_run.event == 'push' | ||
) && | ||
github.repository_owner == 'JimiC' && | ||
github.actor != 'dependabot[bot]' | ||
) | ||
steps: | ||
- name: Cloning repository | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.workflow_run.head_sha }} | ||
|
||
- name: Download artifact | ||
uses: dawidd6/action-download-artifact@v2 | ||
with: | ||
workflow: build.yml | ||
workflow_conclusion: success | ||
name: code-coverage-report | ||
|
||
- name: Uploading code coverage report | ||
uses: paambaati/codeclimate-action@v5 | ||
with: | ||
coverageLocations: lcov.info:lcov | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} |