Add github actions

This commit is contained in:
Sylwester Zieliński
2022-01-31 10:24:37 +01:00
parent 11372953ee
commit 9cdd253efc
10 changed files with 1492 additions and 0 deletions

23
.github/workflows/generate-readme.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: Generate README.md
on:
workflow_dispatch:
jobs:
restorePassword:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- shell: bash
env:
CONTACT_EMAIL: ${{ secrets.CONTACT_EMAIL }}
run: |
git config user.email $CONTACT_EMAIL
git config user.name "Github Action"
git describe --tags
VERSION=`git describe --tags --abbrev=0`
VERSION=`./moustache/split.sh $VERSION`
rm -f ./README.md
VERSION=$VERSION ./moustache/mo ./moustache/README.mo > ./README.md
git add .
git diff-index --quiet HEAD || git commit -m "Update readme to version=$VERSION" && git push