Regenerate README.md #1317
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: Regenerate README.md | |
on: | |
gollum: | |
workflow_dispatch: | |
jobs: | |
generate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Check out repository wiki | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ github.repository }}.wiki | |
path: wiki | |
- name: Prepare ENV variables | |
run: | | |
echo "VALID=$(cat wiki/env | grep ^VALID | cut -d= -f2)" >> $GITHUB_ENV | |
echo "INVALID=$(cat wiki/env | grep INVALID | cut -d= -f2)" >> $GITHUB_ENV | |
echo "DEPRECATED=$(cat wiki/env | grep DEPRECATED | cut -d= -f2)" >> $GITHUB_ENV | |
echo "CHECKNEEDED=$(cat wiki/env | grep CHECKNEEDED | cut -d= -f2)" >> $GITHUB_ENV | |
echo "READYTOCOMMIT=$(cat wiki/env | grep READYTOCOMMIT | cut -d= -f2)" >> $GITHUB_ENV | |
echo "UNKNOWN=$(cat wiki/env | grep UNKNOWN | cut -d= -f2)" >> $GITHUB_ENV | |
echo "LASTMOD=$(date)" >> $GITHUB_ENV | |
- name: Render README.md | |
uses: vafinvr/template-env-action@master | |
env: | |
VALID: ${{ env.VALID }} | |
INVALID: ${{ env.INVALID }} | |
DEPRECATED: ${{ env.DEPRECATED }} | |
CHECKNEEDED: ${{ env.CHECKNEEDED }} | |
READYTOCOMMIT: ${{ env.READYTOCOMMIT }} | |
UNKNOWN: ${{ env.UNKNOWN }} | |
LASTMOD: ${{ env.LASTMOD }} | |
with: | |
filename: TEMPLATE.md | |
- name: Commit changes to README.md | |
run: | | |
cp -p TEMPLATE.md README.md | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add README.md | |
git diff-index --quiet HEAD || git commit -m "Update statistic numbers" && git push |