@@ -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)
0 commit comments