-
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (54 loc) · 1.94 KB
/
readme.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
55
56
57
58
59
60
61
62
63
64
name: Update-Readmes
on:
workflow_dispatch:
push:
jobs:
Update-Readmes:
runs-on: ubuntu-latest
steps:
- name: Check Out Auto Readme Repo
uses: actions/checkout@v4
with:
repository: Kometa-Team/People-Auto-Readme
- name: Check Out Images Repo
uses: actions/checkout@v4
with:
path: imagerepo
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install Requirements
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Update Readmes
run: python auto_readme.py -s "bw" -d "imagerepo"
- name: Check Diff
id: verify_diff
working-directory: ./imagerepo
run: |
git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT
- name: Commit & Push Changes
if: steps.verify_diff.outputs.changed == 'true'
working-directory: ./imagerepo
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git commit -m "Readme Update" -a
git push origin master
- name: Discord Failure Notification
uses: Kometa-Team/discord-notifications@master
if: failure()
with:
webhook_id: ${{ secrets.BUILD_WEBHOOK_ID }}
webhook_token: ${{ secrets.BUILD_WEBHOOK_TOKEN }}
message: <@&1079153184007790652>
title: "${{ secrets.REPO_NAME }}: **Failure**"
color: 16106776
url: https://github.com/Kometa-Team/${{ secrets.REPO_NAME }}/actions/runs/${{ github.run_id }}
username: Metabot
avatar_url: https://raw.githubusercontent.com/Kometa-Team/Kometa/nightly/.github/logo.png
author: GitHub
author_icon_url: https://raw.githubusercontent.com/Kometa-Team/Kometa/nightly/.github/git.png