Skip to content

Update README.md

Update README.md #54

Workflow file for this run

name: Update README
on:
push:
branches: [ master ]
paths:
- 'src/**'
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Check commit message
uses: GsActions/commit-message-checker@v1
with:
pattern: ^(Add|Delete|Update) \d+\.\w+( \| (Add|Delete|Update) \d+\.\w+)*$
flags: gm
error: Commit message should start with Add or Delete or Update
- name: Checkout code
uses: actions/checkout@v2
- name: Cache node modules
id: cacheStep
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: action/node_modules
key: ${{ runner.os }}-build-${{ env.cahce-name }}-${{ hashFiles('action/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Get changed files
uses: jitterbit/get-changed-files@v1
id: files
with:
format: space-delimited
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
if: steps.cacheStep.outputs.cache-hit != 'true'
run: cd action && npm install
- name: Push to github
run: |
id=($(echo "${{ steps.files.outputs.all }}" | grep -oP '\d{4,}'))
cd action
node main.js ${id[@]}
git config --global user.name ${{ secrets.USER }}
git config --global user.email ${{ secrets.EMAIL }}
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git commit -am "Update README.md"
git push