-
Notifications
You must be signed in to change notification settings - Fork 15
49 lines (40 loc) · 1.38 KB
/
sync-fontawesome.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
name: 🔄 Fontawesome
on:
workflow_dispatch:
schedule:
- cron: "0 2 * * 0"
defaults:
run:
working-directory: src/Projektanker.Icons.Avalonia.FontAwesome
permissions:
contents: write
pull-requests: write
jobs:
sync:
name: 🔄 Sync Fontawesome
runs-on: ubuntu-latest
outputs:
modified: ${{ steps.git-check.outputs.modified }}
steps:
- name: 🛒 Checkout
uses: actions/checkout@v4
- name: 📥 Download icons.json
run: wget -O Assets/icons.json https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/metadata/icons.json
- name: ℹ git status
run: git status
- name: 🔎 Check for modified files
id: git-check
run: echo modified=$([ -z "`git status --porcelain`" ] && echo "false" || echo "true") >> $GITHUB_OUTPUT
- name: 🟣 Setup .NET
if: ${{ steps.git-check.outputs.modified == 'true' }}
uses: actions/setup-dotnet@v4
- name: 🧪 dotnet test
if: ${{ steps.git-check.outputs.modified == 'true' }}
run: dotnet test --configuration Release
- name: 💬 Create Pull Request
if: ${{ steps.git-check.outputs.modified == 'true' }}
uses: peter-evans/create-pull-request@v6
with:
branch: fontawesome
commit-message: "FontAwesome icons changed."
title: "feat(FontAwesome): 🔄 icons changed."