Skip to content

Commit 14f9d8d

Browse files
authored
Restore workflow to update icons from Excel file
1 parent 2b07c82 commit 14f9d8d

1 file changed

Lines changed: 46 additions & 45 deletions

File tree

Lines changed: 46 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,48 @@
1-
# name: Retrieve latest icons from excel file
2-
3-
# on:
4-
# schedule:
5-
# - cron: 0 0 */4 * *
6-
# workflow_dispatch:
7-
8-
# jobs:
9-
# load-icons:
10-
# if: github.repository == 'marticliment/UniGetUI'
11-
# runs-on: windows-latest
12-
13-
# steps:
14-
# - name: Checkout repository
15-
# uses: actions/checkout@v6
16-
17-
# - name: Download icons json file
18-
# run: |
19-
# python -m pip install xlrd==1.2.0
20-
# git config user.email "excelbot@github.com"
21-
# git config user.name "Excel Bot"
22-
# python scripts/generate_json_from_excel.py
23-
# git commit WebBasedData/screenshot-database.json -m "Update icons and screenshots"
24-
# exit 0
25-
26-
# - name: Prepare PR Body with Images
27-
# id: prepare_pr_body
28-
# run: |
29-
# echo "## New Images" > pr_body.md
30-
# Get-Content WebBasedData/new_urls.txt | ForEach-Object {
31-
# if (![string]::IsNullOrWhiteSpace($_)) {
32-
# Add-Content pr_body.md "<a href='$_'><img src='$_' width='200' height='200' /></a>" -NoNewline
33-
# }
34-
# }
35-
# - name: Create Pull Request
36-
# uses: peter-evans/create-pull-request@v8
37-
# with:
38-
# delete-branch: true
39-
# base: main
40-
# title: "Update icons and screenshots from the excel file"
41-
# reviewers: "${{ github.repository_owner }}"
42-
# author: "Excel Bot <excel-bot@users.noreply.github.com>"
43-
# commit-message: "Update icons and screenshots from the excel file"
44-
# branch: pull-request/update-icons-and-screenshots
45-
# body-path: pr_body.md
1+
name: Retrieve latest icons from excel file
2+
3+
on:
4+
schedule:
5+
- cron: 0 0 */4 * *
6+
workflow_dispatch:
7+
8+
jobs:
9+
load-icons:
10+
if: github.repository == 'marticliment/UniGetUI'
11+
runs-on: windows-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v6
16+
17+
- name: Download icons json file
18+
run: |
19+
python -m pip install xlrd==1.2.0
20+
git config user.email "excelbot@github.com"
21+
git config user.name "Excel Bot"
22+
python scripts/generate_json_from_excel.py
23+
git commit WebBasedData/screenshot-database.json -m "Update icons and screenshots"
24+
exit 0
25+
26+
- name: Prepare PR Body with Images
27+
id: prepare_pr_body
28+
run: |
29+
echo "## New Images" > pr_body.md
30+
Get-Content WebBasedData/new_urls.txt | ForEach-Object {
31+
if (![string]::IsNullOrWhiteSpace($_)) {
32+
Add-Content pr_body.md "<a href='$_'><img src='$_' width='200' height='200' /></a>" -NoNewline
33+
}
34+
}
35+
- name: Create Pull Request
36+
uses: peter-evans/create-pull-request@v8
37+
with:
38+
delete-branch: true
39+
base: main
40+
title: "Update icons and screenshots from the excel file"
41+
reviewers: "${{ github.repository_owner }}"
42+
author: "Excel Bot <excel-bot@users.noreply.github.com>"
43+
commit-message: "Update icons and screenshots from the excel file"
44+
branch: pull-request/update-icons-and-screenshots
45+
body-path: pr_body.md
46+
4647

4748

0 commit comments

Comments
 (0)