-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (43 loc) · 2.28 KB
/
build-package.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: Build Package
on:
workflow_dispatch:
push:
branches: [ "*" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Make New widgets
shell: bash
run: |
source widgets_list
for widget in $(grep -oP '^\w+(?=\(\))' widgets_list); do
$widget
if [ ! -d "usr/share/plasma/plasmoids/org.biglinux.$Name" ]; then
mkdir -p usr/share/plasma/plasmoids/org.biglinux.$Name
fi
cp -rf base/org.biglinux.Base/* usr/share/plasma/plasmoids/org.biglinux.$Name/
sed -i "s/Base/$Name/" "usr/share/plasma/plasmoids/org.biglinux.$Name/metadata.json"
URL=$(sed 's/\//\\\//g' <<< $URL)
sed -i "s/URL/$URL/" "usr/share/plasma/plasmoids/org.biglinux.$Name/contents/config/main.xml"
cp -f icons/$Name.* usr/share/icons/hicolor/scalable/apps/
done
- name: Update github
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add --all
if [ -n "$(git commit -m "Make Widgets $(date +%y-%m-%d_%H:%M)" -a | grep "nothing to commit")" ];then exit 0; fi
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
- name: Send Hooks BigLinux Build Package
shell: bash
run: |
if [ -z "$(grep biglinux-package-template pkgbuild/PKGBUILD)" ];then
curl -X POST -H "Accept: application/json" -H "Authorization: token ${{ secrets.WEBHOOK_TOKEN }}" --data '{"event_type": "${{ github.repository }}", "client_payload": { "branch": "${{ github.ref_name }}", "url": "https://github.com/${{ github.repository }}"}}' https://api.github.com/repos/BigLinux-Package-Build/build-package/dispatches
curl -X POST -H "Accept: application/json" -H "Authorization: token ${{ secrets.WEBHOOK_TOKEN }}" --data '{"event_type": "${{ github.repository }}", "client_payload": { "branch": "${{ github.ref_name }}", "url": "https://github.com/${{ github.repository }}"}}' https://api.github.com/repos/BigLinux-Package-Build/build-package-ARM/dispatches
fi