-
Notifications
You must be signed in to change notification settings - Fork 22
48 lines (43 loc) · 1.47 KB
/
update-readme.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
name: 'Update readme count'
permissions:
contents: write # Permission to create commits
checks: write # Permission to trigger checks
pull-requests: write
on: workflow_dispatch
jobs:
createPullRequest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Install dependencies
run: |
cp config.example.py config.py
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Get combination count
id: get-count
run: echo "count=$(python gen.py -c)" >> $GITHUB_OUTPUT
- name: Update readme
run:
python update_readme_count.py "${{ steps.get-count.outputs.count }}"
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
commit-message: Update combination count
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
signoff: false
token: ${{ secrets.PAT }}
branch: update-combination-count
delete-branch: true
title: 'Update combination count'
body: |
Update combination count in README
labels: |
automated pr
draft: false