-
-
Notifications
You must be signed in to change notification settings - Fork 25
46 lines (39 loc) · 1.22 KB
/
icons-dumb.yml
File metadata and controls
46 lines (39 loc) · 1.22 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: "Add dumb icons"
on:
#schedule:
# - cron: "*/15 * * * *"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
sync-files:
name: "Copy dumb icon where missing"
runs-on: ubuntu-latest
steps:
- name: "Checkout source repository"
uses: actions/checkout@v4
- name: "Start copy"
run: |
LIST=$(curl -Ls https://raw.githubusercontent.com/ivan-hc/AM/main/programs/x86_64-apps)
[ -z "$LIST" ] && exit 1
MDS=$(ls apps/* | sed 's:.*/::; s/.md$//g')
for m in $MDS; do
if ! test -f icons/"$m".png; then
cp -r no-icon.png "icons/$m.png"
fi
done
rm -f icons/*.md
- name: "Push to Source"
run: |
git config --global user.name "Portable-Linux-Apps"
git config --global user.email "noreply@github.com"
git add icons
if git diff-index --quiet HEAD; then
echo "No changes to commit." >> $GITHUB_STEP_SUMMARY
else
git commit -m "Add dumb icons"
git push && echo "Sync to Source succeeded" >> $GITHUB_STEP_SUMMARY
fi