Skip to content

Update README.md

Update README.md #123

Workflow file for this run

name: Update README.md
on:
workflow_dispatch:
workflow: "*"
schedule:
# Run at midnight on each Saturday
- cron: '0 0 * * 6'
# Don't run on pull_request because it is not easy to make it secure
push:
paths:
- 'extension_list.txt'
- 'readme_source/**'
- 'make_README.py'
branches:
- '*'
jobs:
update_readme:
runs-on: ubuntu-latest
permissions:
contents: write
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@master
with:
miniforge-variant: Mambaforge
miniforge-version: latest
# use base environment, so that when using pip, this is from the
# mambaforge distribution
auto-activate-base: true
activate-environment: ""
- name: Conda info
run: |
conda info
conda list
- name: Install extensions
run: |
mamba install --file extension_list.txt
- name: Conda list
run: |
conda list
- name: Update README.md
run: |
python make_README.py
- name: Git status
run: |
git status
# Get the exit code of the last command and save it to the COMMIT_REQUIRED variable
echo "COMMIT_REQUIRED=$(git diff --quiet --exit-code || echo $?)" >> $GITHUB_ENV
- name: Push changes to Github
if: ${{ env.COMMIT_REQUIRED == 1 }}
run: |
git config --global user.name "Automatic README update"
git config --global user.email "[email protected]"
git add .
git commit -m "Update README.md"
git push