Skip to content

counters

counters #6881

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@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.7
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
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: actions/create-github-app-token@a0de6af83968303c8c955486bf9739a57d23c7f1 # v1.10.0
with:
app-id: ${{ secrets.CF_CURATOR_APP_ID }}
private-key: ${{ secrets.CF_CURATOR_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- 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 data/labels.json
git commit --allow-empty -m '[ci skip] counter data'
git pull
git push