Added raw_list.txt + auto-update github-action

feature-request from #3
This commit is contained in:
Maciej Pulikowski 2022-01-15 14:26:08 +01:00 committed by GitHub
parent 5bc1eb6815
commit 64350bdd02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

37
.github/workflows/UpdateRawList.yml vendored Normal file
View file

@ -0,0 +1,37 @@
# This is a workflow to generate raw_list.txt based on README.md
name: UpdateRawList
on:
# Triggers the workflow on push request events but only for the main branch
push:
branches: [ main ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Run command in terminal # Run command to get text from README and create raw_list.txt
run: |
printf '%b\n' "$(sed -n '/^-\s*\w*.$/p' README.md | sed -r 's/^.{2}//')" > raw_list.txt
- name: Commit files # commit the output folder
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add raw_list.txt
git commit -m "[BOT] Auto update raw_list.txt"
- name: Push changes # push the output folder to your repo
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true