-
Notifications
You must be signed in to change notification settings - Fork 27
47 lines (44 loc) · 1.64 KB
/
sync.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
name: "Sync"
on:
workflow_dispatch:
schedule:
# Every day at 3:15 AM UTC
- cron: '15 3 * * *'
jobs:
sync:
name: "Get new GitHub release data"
if: ${{ github.repository == 'gap-system/GapWWW' }}
runs-on: ubuntu-latest
steps:
- name: "Check out the GapWWW repository in order to make changes to it"
uses: actions/checkout@v4
- name: "Clone GAP for its most up-to-date release scripts"
uses: actions/checkout@v4
with:
repository: gap-system/gap
ref: master
path: tmp/gap/
fetch-depth: 1
- uses: actions/setup-python@v5
with:
python-version: 3.9
- name: "Install the required Python modules"
run: pip3 install PyGithub requests python-dateutil
- name: "Run the GAP dev release script for updating the website"
run: python -u ./tmp/gap/dev/releases/update_website.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Remove GAP clone"
run: rm -rf ./tmp/gap
- name: "Make a pull request to the master branch of this repository"
uses: peter-evans/create-pull-request@v6
with:
base: master
branch: auto/sync-with-github-releases
commit-message: Sync data from GAP's GitHub release system
title: Sync data from GAP's GitHub release system
body: >-
Automatically created by a GitHub Actions workflow, using with the
GAP release script `dev/release/update_website.py`.
You may wish to squash and merge this pull request, in order
to give it a more descriptive commit message.