-
Notifications
You must be signed in to change notification settings - Fork 2.5k
42 lines (34 loc) · 1.12 KB
/
build-readme.yml
File metadata and controls
42 lines (34 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Build readme file
on:
workflow_dispatch:
schedule:
- cron: '0 * * * *' # Every hour
jobs:
Build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 1
- name: Use Node.js (dependency)
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Completion Table
run: node updateCompletionTable.js;
- name: Check for modified files
id: git-check
run: echo modified=$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi) >> $GITHUB_OUTPUT
- name: Push
if: steps.git-check.outputs.modified == 'true'
run: |
git config --global user.email "71089234+Ahmad-A0@users.noreply.github.com"
git config --global user.name "Bot-A0"
git add .
git commit -am "📜 Update README table (🛠️ from Github Actions)" || true
git push || git pull --rebase && git push