name: 🚀 Generates ICONS

on:
  push:
  workflow_dispatch:
jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Setup Python
        uses: actions/setup-python@v4
        with:
          python-version: "3.9"
          architecture: "x64"

      - name: ICONS Generator
        run: |-
          python config/ci.py
          cat ICONS.md

      - name: Load to GitHub
        run: |-
          git diff
          git config --global user.email "noreply@walkx.fyi"
          git config --global user.name "Dashboard Icons Bot"
          git add -A
          git commit -m ":construction_worker: Generates ICONS.md" || exit 0
          git push