Badges #113
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
name: Badges | |
on: | |
schedule: | |
- cron: '24 03 * * 3' | |
workflow_dispatch: | |
permissions: {} | |
jobs: | |
downloads: | |
name: Docker pulls | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get package downloads | |
id: downloads | |
uses: ./misc/action/package-downloads | |
with: | |
url: ${{ github.server_url }} | |
repo: ${{ github.repository }} | |
package: publish-unit-test-result-action | |
- name: Create badge | |
uses: emibcn/badge-action@4209421db54c8764d8932070ffd0f81715a629bf | |
with: | |
label: Docker pulls | |
status: ${{ steps.downloads.outputs.total_downloads }} (${{ steps.downloads.outputs.recent_downloads_per_day }}/d) | |
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 }}/d)", "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 | |
permissions: | |
packages: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Fetch workflows | |
id: workflows | |
uses: ./misc/action/fetch-workflows | |
- name: Create badge | |
uses: emibcn/badge-action@808173dd03e2f30c980d03ee49e181626088eee8 | |
with: | |
label: GitHub Workflows | |
status: ${{ steps.workflows.outputs.total_workflows }} | |
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@6e8d64427fe47cbacf4ab6b890411f1d67c07f3e | |
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@6e8d64427fe47cbacf4ab6b890411f1d67c07f3e | |
with: | |
token: ${{ secrets.GIST_TOKEN }} | |
gistURL: https://gist.githubusercontent.com/EnricoMi/612cb538c14731f1a8fefe504f519395 | |
file: workflows.json |