-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (38 loc) · 1.11 KB
/
update-readme.yaml
File metadata and controls
38 lines (38 loc) · 1.11 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
name: Update README.md
on:
pull_request: {}
workflow_dispatch: {}
push:
branches: ["main"]
schedule:
- cron: "0 0 * * *"
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Run GitPortfolio
uses: iosifache/gitportfolio@main
with:
config: ./config.yaml
pat: ${{ secrets.pat }}
datasources: ./custom_datasources
template: ./TEMPLATE.md
output: ./README.md
- name: Check if the files are modified and commit eventual changes
run: |
if git diff; then
git add README.md ${{ inputs.config }}
git config --global user.name "GitPortfolio updater"
git config --global user.email "username@users.noreply.github.com"
git commit -a -m "Updates the GitPortfolio artifacts"
git push
else
echo "The files are unchanged. The action will stop."
exit 0
fi