Percentage tracking #314
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
# On every push this script is executed | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 5 * * *" | |
#concurrency: data | |
name: Percentage tracking | |
jobs: | |
percentage_track: | |
timeout-minutes: 120 | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- uses: robinraju/[email protected] | |
with: | |
repository: "pypi-data/toolchain" | |
fileName: "pypi-data-toolchain.tar.gz" | |
extract: true | |
latest: true | |
out-file-path: "toolchain/" | |
- name: Generate token | |
id: generate_token | |
uses: pypi-data/github-app-token@v1 | |
with: | |
app_id: ${{ secrets.APP_ID }} | |
private_key: ${{ secrets.APP_PRIVATE_KEY }} | |
- env: | |
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} | |
run: | | |
${{ github.workspace }}/toolchain/pypi-data-toolchain list-repositories --json > stats/repositories.json | |
${{ github.workspace }}/toolchain/pypi-data-toolchain list-repositories --json --with-release-stats > stats/repositories_with_releases.json | |
- run: head stats/repositories.json -n 20 | |
- uses: EndBug/add-and-commit@v9 | |
with: | |
add: | | |
stats/repositories.json | |
stats/repositories_with_releases.json | |
author_email: "41898282+github-actions[bot]@users.noreply.github.com" | |
author_name: "commit-bot" | |
message: "Add repo stats information" | |
push: true | |
fetch: true | |
pull: '--rebase --autostash' |