Repository navigation
56 lines (52 loc) · 2.12 KB
/
Copy pathdiscover-pkgforge.yml
File metadata and controls
56 lines (52 loc) · 2.12 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
# Finds the AppImages that https://github.com/pkgforge-dev builds (one
# repository per application, named like "Foo-AppImage") and that are not in the
# catalog yet, and proposes each as a new entry in its own pull request (labels
# auto-discovered, not-upstream, repackaged), for a maintainer to review. Never
# merges on its own: publish-pr-screenshot.yml's auto-merge skips these PRs.
# Manual only (workflow_dispatch).
name: Discover pkgforge-dev
on:
workflow_dispatch:
inputs:
limit:
description: 'Maximum number of pull requests (apps) to open'
type: number
default: 1
dry_run:
description: 'Dry run (only print what would be opened; nothing is pushed or changed)'
type: boolean
default: false
jobs:
discover-pkgforge:
if: github.repository == 'AppImage/appimage.github.io'
runs-on: ubuntu-latest
timeout-minutes: 150 # the script stops checking after 2 h (PKGFORGE_MAX_SECONDS)
# One run at a time, so that two runs cannot propose the same app.
concurrency:
group: discover-pkgforge
cancel-in-progress: false
permissions:
contents: write
pull-requests: write
env:
# A personal token lets the opened PR's Test workflow actually start
# (a PR opened with this workflow's own token starts none): DISCOVER_TOKEN
# if set, else the SCREENSHOT_UPLOAD_TOKEN secret, else GITHUB_TOKEN (then
# the PR body says to close and reopen it). See MAINTAINER.md.
DISCOVER_TOKEN: ${{ secrets.DISCOVER_TOKEN }}
SCREENSHOT_UPLOAD_TOKEN: ${{ secrets.SCREENSHOT_UPLOAD_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Discover and propose new entries
env:
LIMIT: ${{ github.event.inputs.limit || '1' }}
DRY_RUN: ${{ github.event.inputs.dry_run }}
run: |
ARGS=(--limit "$LIMIT")
[ "$DRY_RUN" == "true" ] && ARGS+=(--dry-run)
bash code/discover-pkgforge.sh "${ARGS[@]}"