-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (41 loc) · 1.13 KB
/
main.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
name: Generate and publish Flathub apps yaml file
on:
schedule:
- cron: '0 2 * * *' # run at 2 AM UTC
push:
branches:
- main
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: sudo apt install -y yamllint python3-requests && sudo snap install yq
- name: Checkout
uses: actions/checkout@v4
- name: Generate apps list
run: python3 flathub_yaml.py > apps.unsorted.yaml
- name: Sort apps list
run: yq 'sort_by(.name | downcase)' apps.unsorted.yaml > apps.yaml
- name: Validate apps list
run: ./validate.sh
- name: Stage apps list
run: mkdir _site && mv apps.yaml _site/
- name: Upload apps list
uses: actions/upload-pages-artifact@v3
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4