Skip to content

Add update-types workflow #1

Add update-types workflow

Add update-types workflow #1

Workflow file for this run

name: Update

Check failure on line 1 in .github/workflows/update.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/update.yml

Invalid workflow file

invalid `cron` attribute "* * * * 7"
'on':
schedule:
- cron: '* * * * 7'
workflow_dispatch: {}
permissions:
contents: write
jobs:
update-types:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- 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 requirements.txt
- name: Build new types
run: python type-generator/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