-
Notifications
You must be signed in to change notification settings - Fork 3
66 lines (55 loc) · 1.64 KB
/
pull_request.yml
File metadata and controls
66 lines (55 loc) · 1.64 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Fetch Collaborators
on:
push:
paths-ignore:
- 'README.md'
- '.gitignore'
- 'markdown/**'
branches:
- main
- master
workflow_dispatch:
jobs:
fetch-collaborators:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
- name: Fetch Collaborators
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python tools/fetch_collaborators.py
- name: Print collaborators.json
run: cat commons/collaborators/collaborators.json
- name: Commit changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add commons/collaborators/collaborators.json
git commit -m 'Update collaborators.json' || echo "No changes to commit"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Index Games
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python tools/index_games.py
- name: Commit changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m 'Indexed games' || echo "No changes to commit"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}