Skip to content

Commit 6ca5982

Browse files
authored
Merge pull request #1 from processing/update-workflow
add update workflow
2 parents 901c1e6 + 08675fe commit 6ca5982

File tree

2 files changed

+59
-2
lines changed

2 files changed

+59
-2
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Update Contributions
2+
on:
3+
push:
4+
branches:
5+
- main
6+
schedule:
7+
# * is a special character in YAML so you have to quote this string
8+
- cron: '45 4 * * *'
9+
workflow_dispatch:
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
update:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout sources
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: 3.x
24+
25+
- name: Install dependencies
26+
run: pip install -r requirements.txt
27+
28+
- name: fetch updates and edit database
29+
run: |
30+
cd scripts
31+
python fetch_updates.py
32+
33+
- name: commit changes
34+
uses: stefanzweifel/git-auto-commit-action@v5
35+
with:
36+
commit_message: chore(CI) update contributions to database and output files
37+
branch: main
38+
add_options: '-u'
39+
40+
- name: Get current date
41+
id: date
42+
run: echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
43+
44+
- name: update output files
45+
run: |
46+
python to_contribs_txt.py
47+
python to_sources_jsons.py
48+
cd ..
49+
50+
- uses: actions/upload-artifact@v4
51+
with:
52+
name: output-files-${{ env.DATE }}
53+
overwrite: true
54+
path: |
55+
pde/contribs.txt
56+
sources/*.json
57+

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# [WIP] processing-contributions
22

3-
[!WARNING]
4-
This repository is a work in progress.
3+
> [!WARNING]
4+
> This repository is a work in progress.
55
66
This repository maintains the contributions to Processing.
77

0 commit comments

Comments
 (0)