-
Notifications
You must be signed in to change notification settings - Fork 161
35 lines (35 loc) · 1.07 KB
/
examples_api_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 examples API
on:
schedule:
- cron: '00 17 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Fixup git permissions
# https://github.com/actions/checkout/issues/766
shell: bash
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- run: pip install -r requirements.txt
- name: Add components status
run: gh project item-list 32 --owner italia --format json --limit 100 | jq > api/components_status.json
env:
GH_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
- run: python extract_examples.py
- name: Setup Git
uses: fregante/setup-git-user@v1
- name: Add API stuff
run: |
git add api/
git commit -m "chore: update examples api"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
title: "chore: update examples api"
branch: feature/update-examples-api