-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (35 loc) · 1.1 KB
/
auto-generator.yml
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: Readme Generator
on:
workflow_dispatch:
push:
paths:
- ".github/md-generator/generate_markdown.py"
- ".github/md-generator/generate_icon_table.py"
- ".github/md-generator/generate_graph.py"
- ".github/workflows/auto-generator.yml"
- "icons/"
pull_request:
branches:
- production
paths:
- "icons/**"
jobs:
readme-generator:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get branch name
uses: rlespinasse/[email protected]
- run: sudo python3 .github/md-generator/generate_markdown.py icons
- name: Check for changes
id: git_status
run: |
git diff --exit-code || echo "changes"
- name: Commit & Push in ${{ env.GITHUB_REF_SLUG_URL }}
if: steps.git_status.outputs.result == 'changes'
run: |
git add .
git config user.name "github-actions"
git config user.email "github-actions[bot]@users.noreply.github.com"
git commit -am "update changelog"
git push origin ${{ env.GITHUB_REF_SLUG_URL }}