Skip to content

Update software info summary table #6

Update software info summary table

Update software info summary table #6

name: Update software info summary table
on:
workflow_dispatch:
schedule:
- cron: "0 6 1 * *" # Run at 6 am on the first day of every month
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
pip install pip -U
pip install -r requirements.txt
- name: Checkout a new branch
run: |
TIMESTAMP=$(date -u "+%Y-%m-%d")
BRANCH_NAME="update-software-info-${TIMESTAMP}"
git checkout -b $BRANCH_NAME
- name: Obtain latest software info summary
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python src/software_info.py
- name: Commit and push changes
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git add software_info
git commit -m "[${TIMESTAMP}] update software info"
git push -u -f origin $BRANCH_NAME
# git push origin HEAD
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ env.BRANCH_NAME }}
title: "Automated software info update"
body: "This is an auto-generated PR with updates to the software info."
draft: false