Skip to content

counters

counters #5052

Workflow file for this run

name: counters
on:
push:
branches:
- main
pull_request:
schedule:
- cron: "0 */6 * * *"
workflow_dispatch: null
jobs:
update-counters:
runs-on: ubuntu-latest
name: counters
steps:
- name: checkout
uses: actions/checkout@v2
- uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install deps
run: python -m pip install pygithub requests conda-forge-metadata
- name: Generate token
id: generate_token
uses: conda-forge/github-app-token@e3ab451d57e120b956292a1fa1d21fe4ba171c36
with:
app_id: ${{ secrets.CF_CURATOR_APP_ID }}
private_key: ${{ secrets.CF_CURATOR_PRIVATE_KEY }}
- name: Run script
run: python scripts/live_counts.py
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
- name: Commit to repo
if: github.event_name != 'pull_request'
run: |
git config --global user.email "79913779+conda-forge-curator[bot]@users.noreply.github.com"
git config --global user.name "conda-forge-curator[bot]"
git config --global pull.rebase false
git add data/live_counts.json
git commit --allow-empty -m '[ci skip] counter data'
git pull
git push