Skip to content

Commit 33d4d66

Browse files
committed
2 parents 5efb538 + a51b2c9 commit 33d4d66

File tree

8 files changed

+94
-22
lines changed

8 files changed

+94
-22
lines changed

.github/FUNDING.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are supported funding model platforms
2+
3+
github: jackton1
4+
patreon: # Replace with a single Patreon username
5+
open_collective: tj-actions
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom: []

.github/workflows/auto-approve.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Auto approve
2+
3+
on:
4+
pull_request_target
5+
6+
jobs:
7+
auto-approve:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: hmarr/auto-approve-action@v2
11+
if: |
12+
github.actor == 'dependabot[bot]' ||
13+
github.actor == 'dependabot' ||
14+
github.actor == 'dependabot-preview[bot]' ||
15+
github.actor == 'dependabot-preview' ||
16+
github.actor == 'renovate[bot]' ||
17+
github.actor == 'renovate'
18+
with:
19+
github-token: ${{ secrets.PAT_TOKEN }}

.github/workflows/sync-release-version.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2
12-
- name: Sync release version
12+
- name: Sync release version.
1313
uses: tj-actions/sync-release-version@v8
1414
id: sync-release-version
1515
with:
16-
pattern: 'tj-actions/coverage-badge-py@'
16+
pattern: '${{ github.repository }}@'
1717
paths: |
1818
README.md
1919
- name: Generate CHANGELOG

.github/workflows/test.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ jobs:
1717
uses: actions/checkout@v2
1818
- name: shellcheck
1919
uses: reviewdog/action-shellcheck@v1
20-
- name: Run coverage-badge-py
21-
uses: ./
20+
# - name: Run coverage-badge-py
21+
# uses: ./
22+
# TODO: Add test.

HISTORY.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
1-
History
2-
-------
1+
# Changelog
32

4-
v1 (2021-03-25)
5-
------------------
3+
## [v1.1](https://github.com/tj-actions/coverage-badge-py/tree/v1.1) (2021-03-30)
64

7-
* Initial Release.
5+
[Full Changelog](https://github.com/tj-actions/coverage-badge-py/compare/v1...v1.1)
6+
7+
**Merged pull requests:**
8+
9+
- Configure Renovate [\#2](https://github.com/tj-actions/coverage-badge-py/pull/2) ([renovate[bot]](https://github.com/apps/renovate))
10+
- Upgraded to [\#1](https://github.com/tj-actions/coverage-badge-py/pull/1) ([jackton1](https://github.com/jackton1))
11+
12+
## [v1](https://github.com/tj-actions/coverage-badge-py/tree/v1) (2021-03-25)
13+
14+
[Full Changelog](https://github.com/tj-actions/coverage-badge-py/compare/9a71d8b2395ec6eaf55f510ce22b1a3fe4085d90...v1)
15+
16+
17+
18+
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*

README.md

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1+
[![CI](https://github.com/tj-actions/coverage-badge-py/actions/workflows/test.yml/badge.svg)](https://github.com/tj-actions/coverage-badge-py/actions/workflows/test.yml) [![Update release version.](https://github.com/tj-actions/coverage-badge-py/actions/workflows/sync-release-version.yml/badge.svg)](https://github.com/tj-actions/coverage-badge-py/actions/workflows/sync-release-version.yml)
2+
13
coverage-badge-py
24
-----------------
35

4-
Generate coverage.py badge
5-
6-
Sample badge:
7-
8-
![coverage badge](./coverage.svg)
6+
Generate coverage.py badge like this ![coverage badge](./coverage.svg) without uploading results to a 3rd party site.
97

108
## Usage:
119

@@ -14,7 +12,7 @@ Sample badge:
1412
steps:
1513
- uses: actions/checkout@v2
1614
- name: Coverage Badge
17-
uses: tj-actions/coverage-badge-py@v1
15+
uses: tj-actions/coverage-badge-py@v1.1
1816
```
1917
2018
> NOTE: :warning:
@@ -24,17 +22,43 @@ Sample badge:
2422
2523
| Input | type | required | default | description |
2624
|:-------------:|:-----------:|:-------------:|:----------------------------:|:-------------:|
27-
| token | `string` | `true` | `${{ github.token }}` | [GITHUB_TOKEN](https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow#using-the-github_token-in-a-workflow) <br /> or a repo scoped <br /> [Personal Access Token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) |
28-
| output | `string` | `true` | `coverage.svg` | The output path for the generated coverage badge. |
25+
| output | `string` | `true` | `coverage.svg` | The output path for <br /> the generated coverage badge. |
26+
| overwrite | `string` | `true` | `'true'` | Boolean string used to <br /> determine wheter to overwrite <br /> an existing badge. |
2927

3028

3129

32-
* Free software: [MIT license](LICENSE)
30+
### Example
3331

34-
Features
35-
--------
32+
```yml
33+
...
34+
steps:
35+
- uses: actions/checkout@v2
36+
- name: Coverage Badge
37+
uses: tj-actions/[email protected]
38+
- name: Verify Changed files
39+
uses: tj-actions/[email protected]
40+
id: changed_files
41+
with:
42+
files: coverage.svg
43+
44+
- name: Commit files
45+
if: steps.changed_files.outputs.files_changed == 'true'
46+
run: |
47+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
48+
git config --local user.name "github-actions[bot]"
49+
git add coverage.svg
50+
git commit -m "Updated coverage.svg"
51+
52+
- name: Push changes
53+
if: steps.changed_files.outputs.files_changed == 'true'
54+
uses: ad-m/github-push-action@master
55+
with:
56+
github_token: ${{ secrets.github_token }}
57+
branch: ${{ github.ref }}
58+
```
3659

37-
* TODO
60+
61+
* Free software: [MIT license](LICENSE)
3862

3963

4064
Credits

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Coverage Badge
1+
name: coverage.py badge
22
description: Generate coverage.py badge
33
author: tj-actions
44
inputs:

renovate.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extends": [
3+
"config:base"
4+
]
5+
}

0 commit comments

Comments
 (0)