name: Pull request metadata suggestions on: pull_request_target: types: - opened - reopened - synchronize paths: - 'icons/*.json' permissions: {} # Queue runs instead of cancelling them, so a run that already called the # OpenAI API can save its cache before the next run restores it. concurrency: group: metadata-suggestions-${{ github.event.pull_request.number }} cancel-in-progress: false jobs: pull-request-metadata-suggestions: name: Pull Request Metadata Suggestions if: github.repository == 'lucide-icons/lucide' runs-on: ubuntu-latest permissions: contents: read pull-requests: write steps: # We checkout the main branch of main repository for security reasons. # This is to prevent the workflow from running on a forked repository. - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: lucide-icons/lucide - uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: cache: 'pnpm' node-version-file: 'package.json' - name: Install dependencies run: pnpm install --frozen-lockfile --filter @lucide/suggest-metadata-action - name: Suggest metadata uses: ./.github/actions/suggest-metadata with: openai-api-key: ${{ secrets.OPENAI_API_KEY }} github-token: ${{ secrets.GITHUB_TOKEN }} pull-request-number: ${{ github.event.number }} commit-sha: ${{ github.event.pull_request.head.sha }}