forked from Devolutions/UniGetUI
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (40 loc) · 1.55 KB
/
update-icons.yaml
File metadata and controls
46 lines (40 loc) · 1.55 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
43
44
45
46
name: Retrieve latest icons from excel file
on:
schedule:
- cron: 0 0 */4 * *
workflow_dispatch:
jobs:
load-icons:
if: github.repository == 'marticliment/UniGetUI'
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Download icons json file
run: |
python -m pip install xlrd==1.2.0
git config user.email "excelbot@github.com"
git config user.name "Excel Bot"
python scripts/generate_json_from_excel.py
git commit WebBasedData/screenshot-database.json -m "Update icons and screenshots"
exit 0
- name: Prepare PR Body with Images
id: prepare_pr_body
run: |
echo "## New Images" > pr_body.md
Get-Content WebBasedData/new_urls.txt | ForEach-Object {
if (![string]::IsNullOrWhiteSpace($_)) {
Add-Content pr_body.md "<a href='$_'><img src='$_' width='200' height='200' /></a>" -NoNewline
}
}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
delete-branch: true
base: main
title: "Update icons and screenshots from the excel file"
reviewers: "${{ github.repository_owner }}"
author: "Excel Bot <excel-bot@users.noreply.github.com>"
commit-message: "Update icons and screenshots from the excel file"
branch: pull-request/update-icons-and-screenshots
body-path: pr_body.md