-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (35 loc) · 1015 Bytes
/
update.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
name: Update
'on':
schedule:
- cron: '* * * * Sun'
workflow_dispatch: {}
permissions:
contents: write
jobs:
update-types:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- name: Update submodules
run: |-
git pull --recurse-submodules
git submodule update --remote --recursive type-generator/lemmy-js-client
- name: Setup python
uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Install dependencies
run: pip install -r type-generator/requirements.txt
- name: Build new types
run: cd type-generator && python main.py
- id: date
name: Get current date
run: echo "::set-output name=date::$(date +'%Y%m%d-%s')"
- name: Create pull request
uses: peter-evans/create-pull-request@v6
with:
branch: update-types/feature/update-types-${{ steps.date.outputs.date }}
name: Update types from source