Update software info summary table #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Setup branch name and gh config | |
run: | | |
TIMESTAMP=$(date -u "+%Y-%m-%d") | |
BRANCH_NAME="update-software-info-${TIMESTAMP}" | |
# Export to env so that they can be accessed later | |
echo "TIMESTAMP=$TIMESTAMP" >> $GITHUB_ENV | |
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV | |
git config --global user.name 'github-actions' | |
git config --global user.email '[email protected]' | |
- name: Install dependencies | |
run: | | |
pip install pip -U | |
pip install -r requirements.txt | |
- name: Obtain latest software info summary | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: python src/software_info.py | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ env.BRANCH_NAME }} | |
commit-message: "[${{ env.TIMESTAMP }}] update software info" | |
title: "Automated software info update" | |
body: "This is an auto-generated PR with updates to the software info." | |
draft: false |