forked from elementary/appcenter-web
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (36 loc) · 936 Bytes
/
update.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
---
name: Regenerate App Data
on:
workflow_dispatch:
push:
branches:
- main
paths:
- '_config.yaml'
- 'appstream.xml'
- 'generate-eos-apps.rb'
- '.github/workflows/'
- 'images/icons/'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt update && sudo apt install ruby-nokogiri ruby-crack git
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: |
rm _apps/*
ruby ./generate-eos-apps.rb
- name: Commit
run: |
FILES_CHANGED=$(git diff --name-only | wc -l)
if [[ $FILES_CHANGED != 0 ]]; then
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git commit -m "Automatic update of data" -a
git push
fi