Skip to content

Commit 47d0865

Browse files
committed
#1: Cleanup README and remove push input
1 parent 05a26ee commit 47d0865

File tree

3 files changed

+28
-25
lines changed

3 files changed

+28
-25
lines changed

.github/workflows/test_action.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ jobs:
1212
- uses: actions/checkout@v4
1313

1414
- name: Generate build badge
15-
if: always()
1615
uses: DARMA-tasking/badge-generator@1-initial-version
1716
with:
1817
names: |

README.md

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,38 @@ Generates a status badge using [Shields.io](https://shields.io) and commits it t
1010
|----------------|----------|------------------------------------------------------------------------|
1111
| `name` | Yes | Label for the badge (e.g., matrix item) |
1212
| `result` | Yes | Result of a previous step (`success` or `failure`). |
13-
| `github_token` | Yes | GitHub token with **write access to the Wiki**. |
13+
| `github_token` | Yes | GitHub token with **read/write access to the Wiki**. |
1414

1515
---
1616

1717

1818
## Example
1919

20-
```yaml
21-
(...)
22-
- name: Build
23-
id: build
24-
uses: docker/bake-action@v6
25-
with:
26-
source: .
27-
targets: ${{ matrix.target }}
28-
files: docker-bake.hcl
29-
push: ${{ github.ref == 'refs/heads/develop' }}
30-
31-
- name: Generate build badge
32-
if: always()
33-
uses: DARMA-tasking/badge-generator@master
34-
with:
35-
name: ${{ matrix.image }}
36-
result: ${{ steps.build.outcome }}
37-
github_token: ${{ secrets.BADGE_TOKEN }}
38-
3920
```
21+
- name: Generate build badge
22+
uses: DARMA-tasking/badge-generator@master
23+
with:
24+
names: |
25+
vt-build-amd64-alpine-3-16-clang-cpp
26+
vt-build-amd64-ubuntu-20-04-gcc-9-cuda-12-2-0-cpp
27+
vt-build-amd64-ubuntu-20-04-gcc-10-openmpi-cpp-spack
28+
vt-build-amd64-ubuntu-22-04-gcc-12-cpp
29+
results: |
30+
success
31+
cancelled
32+
failure
33+
failure
34+
github_token: ${{ secrets.GITHUB_TOKEN }}
35+
```
36+
37+
This will generate and commit to [wiki](https://github.com/DARMA-tasking/badge-generator.wiki.git) four badges:
38+
39+
[![](https://github.com/DARMA-tasking/badge-generator/wiki/DARMA-tasking/badge-generator/vt-build-amd64-alpine-3-16-clang-cpp-badge.svg)]() <br>
40+
[![](https://github.com/DARMA-tasking/badge-generator/wiki/DARMA-tasking/badge-generator/vt-build-amd64-ubuntu-20-04-gcc-9-cuda-12-2-0-cpp-badge.svg)]() <br>
41+
[![](https://github.com/DARMA-tasking/badge-generator/wiki/DARMA-tasking/badge-generator/vt-build-amd64-ubuntu-20-04-gcc-10-openmpi-cpp-spack-badge.svg)]() <br>
42+
[![](https://github.com/DARMA-tasking/badge-generator/wiki/DARMA-tasking/badge-generator/vt-build-amd64-ubuntu-22-04-gcc-12-cpp-badge.svg)]() <br>
43+
44+
Then we can reference those badges using the link:
45+
`https://github.com/DARMA-tasking/badge-generator/wiki/DARMA-tasking/{repository}/{workflow_name}-badge.svg`
46+
47+
(**NOTE:** `github_token` has to be a token that grants **wiki** read/write permissions to `badge-generator` repository)

action.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ inputs:
1313
github_token:
1414
description: 'GitHub token with permissions to write to the wiki.'
1515
required: true
16-
push:
17-
description: 'Whether to push to wiki repository or not'
18-
default: true
1916

2017
# Define the execution logic for the action
2118
runs:
@@ -58,7 +55,6 @@ runs:
5855
done
5956
6057
- name: Commit and Push to Wiki
61-
if: ${{ inputs.push == 'true' }}
6258
shell: bash
6359
run: |
6460
cd wiki

0 commit comments

Comments
 (0)