Testing the action #158
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: Testing the action | |
on: | |
schedule: | |
- cron: "0 0 * * *" # <= runs every 24 hours | |
workflow_dispatch: | |
jobs: | |
updating-badge-files: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- package: fastapi | |
color: '#039284' | |
- package: requests | |
color: yellow | |
- package: django | |
color: '#0A4A33' | |
- package: pydantic | |
color: '#E51EE8' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Run action | |
uses: ./ | |
with: | |
package_name: ${{ matrix.package }} | |
file_name: ${{ matrix.package }}_badge.svg | |
badge_color: ${{ matrix.color }} | |
- name: Upload badges as artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
path: .pypi_chart/${{ matrix.package }}_badge.svg | |
commit-badges: | |
needs: updating-badge-files | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download badges artifact | |
uses: actions/download-artifact@v3 | |
with: | |
path: .pypi_chart/ | |
merge-multiple: true | |
- name: Commiting | |
uses: EndBug/add-and-commit@v9 | |
with: | |
default_author: github_actions | |
message: 'chart badge updated' | |