name: Lunaria

on:
  pull_request_target:
    types: [opened, synchronize]
    branches: [main]

permissions:
  contents: read
  pull-requests: write

jobs:
  lunaria-overview:
    name: Generate Lunaria Overview
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Setup Bun
        uses: oven-sh/setup-bun@v1
        with:
          bun-version: latest 

      - name: Install Dependencies
        run: bun install

      - name: Generate Lunaria Overview
        uses: yanthomasdev/lunaria-action@main
        with:
          token: ${{ secrets.AUTOMATA_TOKEN }}
