Skip to content

Commit

Permalink
Merge pull request #1 from processing/update-workflow
Browse files Browse the repository at this point in the history
add update workflow
  • Loading branch information
mingness authored Oct 29, 2024
2 parents 901c1e6 + 08675fe commit 6ca5982
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 2 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/update_contributions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Update Contributions
on:
push:
branches:
- main
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '45 4 * * *'
workflow_dispatch:
permissions:
contents: write

jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.x

- name: Install dependencies
run: pip install -r requirements.txt

- name: fetch updates and edit database
run: |
cd scripts
python fetch_updates.py
- name: commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: chore(CI) update contributions to database and output files
branch: main
add_options: '-u'

- name: Get current date
id: date
run: echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV

- name: update output files
run: |
python to_contribs_txt.py
python to_sources_jsons.py
cd ..
- uses: actions/upload-artifact@v4
with:
name: output-files-${{ env.DATE }}
overwrite: true
path: |
pde/contribs.txt
sources/*.json
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# [WIP] processing-contributions

[!WARNING]
This repository is a work in progress.
> [!WARNING]
> This repository is a work in progress.
This repository maintains the contributions to Processing.

Expand Down

0 comments on commit 6ca5982

Please sign in to comment.