Skip to content

Generate and publish Flathub apps yaml file #53

Generate and publish Flathub apps yaml file

Generate and publish Flathub apps yaml file #53

Workflow file for this run

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