Skip to content

Commit

Permalink
auto-update list
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulcollenteur committed Sep 25, 2024
1 parent f837abe commit a003630
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 3 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/update_readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Update README

on:
schedule:
- cron: '0 0 * * 0' # Runs every Sunday at midnight
workflow_dispatch: # Allows manual triggering of the workflow

jobs:
update-readme:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies
run: |
pip install requests
- name: Run update_list.py
run: |
python update_list.py
- name: Run generate_list.py
run: |
python generate_list.py
- name: Commit and push changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add README.md list.json
git commit -m 'Update README.md and list.json [skip ci]'
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 1 addition & 3 deletions generate_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ def generate_list():

if version or last_update:
formatted_date = format_date(last_update)
description += (
f" (Version: {version}, Last Update: {formatted_date})"
)
description += f" (V.: {version}, Last Update: {formatted_date})"

pypi_logo = (
f"[![PyPI](https://img.shields.io/badge/-3776AB?logo=python&logoColor=white)]({pypi_url})"
Expand Down

0 comments on commit a003630

Please sign in to comment.