-
-
Notifications
You must be signed in to change notification settings - Fork 11
50 lines (42 loc) · 1.47 KB
/
counters.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.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@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
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