Skip to content

Commit

Permalink
Add badge JSON to GIST (#536)
Browse files Browse the repository at this point in the history
  • Loading branch information
EnricoMi committed Nov 28, 2023
1 parent 8cdbc41 commit 1b521c1
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion .github/workflows/badges.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Badges

on:
schedule:
- cron: '24 03 * * 3'
- cron: '52 07 * * *'
workflow_dispatch:

permissions: {}
Expand Down Expand Up @@ -32,13 +32,24 @@ jobs:
color: blue
path: downloads.svg

- name: Create JSON
run:
echo '{"subject": "Docker pulls", "status": "${{ steps.downloads.outputs.total_downloads }} (${{ steps.downloads.outputs.recent_downloads_per_day }}/day)", "color": "blue"}' > downloads.json

- name: Upload badge to Gist
uses: andymckay/append-gist-action@1fbfbbce708a39bd45846f0955ed5521f2099c6d
with:
token: ${{ secrets.GIST_TOKEN }}
gistURL: https://gist.githubusercontent.com/EnricoMi/612cb538c14731f1a8fefe504f519395
file: downloads.svg

- name: Upload JSON to Gist
uses: andymckay/append-gist-action@1fbfbbce708a39bd45846f0955ed5521f2099c6d
with:
token: ${{ secrets.GIST_TOKEN }}
gistURL: https://gist.githubusercontent.com/EnricoMi/612cb538c14731f1a8fefe504f519395
file: downloads.json

workflows:
name: Dependent workflows
runs-on: ubuntu-latest
Expand All @@ -61,9 +72,20 @@ jobs:
color: blue
path: workflows.svg

- name: Create JSON
run:
echo '{"subject": "GitHub Workflows", "status": "${{ steps.workflows.outputs.total_workflows }}", "color": "blue"}' > workflows.json

- name: Upload badge to Gist
uses: andymckay/append-gist-action@1fbfbbce708a39bd45846f0955ed5521f2099c6d
with:
token: ${{ secrets.GIST_TOKEN }}
gistURL: https://gist.githubusercontent.com/EnricoMi/612cb538c14731f1a8fefe504f519395
file: workflows.svg

- name: Upload JSON to Gist
uses: andymckay/append-gist-action@1fbfbbce708a39bd45846f0955ed5521f2099c6d
with:
token: ${{ secrets.GIST_TOKEN }}
gistURL: https://gist.githubusercontent.com/EnricoMi/612cb538c14731f1a8fefe504f519395
file: workflows.json

0 comments on commit 1b521c1

Please sign in to comment.