-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
54 lines (47 loc) · 1.49 KB
/
action.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
43
44
45
46
47
48
49
50
51
52
53
54
name: update-shotgrid-readme
description: Automatic README.md updater for ShotGrid frameworks/engines/apps.
branding:
icon: book-open
color: blue
inputs:
github_token:
required: true
description: GitHub secret token
infoFile:
required: false
description: The info.yml file
default: info.yml
prepend:
required: false
description: Prepend an existing readme file after the name and description.
append:
required: false
description: Append an existing readme file to the end.
runs:
using: composite
steps:
- name: checkout repo content
uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: install python packages
shell: bash
run: |
python -m pip install --upgrade pip
pip install -r ${{ github.action_path }}/requirements.txt
- name: execute py script
shell: bash
run: python ${{ github.action_path }}/tk-readme-generator.py "${{ inputs.infoFile }}" -o -p "${{ inputs.prepend }}" -a "${{ inputs.append }}"
- name: commit files
shell: bash
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git diff-index --quiet HEAD || (git commit -a -m "Update README.md" --allow-empty)
- name: push changes
uses: ad-m/[email protected]
with:
github_token: ${{ inputs.github_token }}
branch: ${{ github.ref }}