Repository navigation
Expand file tree
/
Copy pathself-host-apps-refresh-github.yml
More file actions
74 lines (62 loc) · 1.75 KB
/
Copy pathself-host-apps-refresh-github.yml
File metadata and controls
74 lines (62 loc) · 1.75 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Refresh self-host app GitHub facts
on:
schedule:
- cron: "0 */12 * * *"
workflow_dispatch:
inputs:
limit:
description: "Maximum rows to refresh. Use 0 with all=true."
default: "500"
required: false
all:
description: "Refresh every matching row instead of using limit."
default: false
required: false
type: boolean
dry_run:
description: "Run without writing database updates."
default: false
required: false
type: boolean
permissions:
contents: read
concurrency:
group: self-host-apps-refresh-github
cancel-in-progress: false
jobs:
refresh:
runs-on: ubuntu-latest
timeout-minutes: 20
env:
DATABASE_URL: ${{ secrets.DATABASE_POOLER_URL }}
GITHUB_TOKEN: ${{ secrets.STACK127_GITHUB_TOKEN || github.token }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
- name: Install dependencies
run: npm ci
- name: Refresh GitHub facts
run: |
args=(
"--published-only"
"--batch-size" "40"
)
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
if [ "${{ inputs.all }}" = "true" ]; then
args+=("--all")
else
args+=("--limit" "${{ inputs.limit || '500' }}")
fi
if [ "${{ inputs.dry_run }}" = "true" ]; then
args+=("--dry-run")
fi
else
args+=("--limit" "500")
args+=("--max-age-hours" "12")
fi
npm run self-host-apps:refresh-github -- "${args[@]}"