generated from ScoopInstaller/BucketTemplate
-
Notifications
You must be signed in to change notification settings - Fork 33
61 lines (53 loc) · 1.78 KB
/
critical-updates.yml
File metadata and controls
61 lines (53 loc) · 1.78 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
name: Critical Updates
on:
workflow_dispatch:
schedule:
# Every 15 minutes for critical apps
- cron: '*/15 * * * *'
jobs:
update-critical:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Update critical apps
run: |
# Define your most critical apps (50 max)
$criticalApps = @(
"hydra-launcher",
"sigma-file-manager",
"7zip",
"git",
"vscode",
"nodejs",
"python",
"firefox",
"chrome",
"docker"
# Add more as needed, but keep under 50
)
# Setup Scoop
if (-not (Get-Command scoop -ErrorAction SilentlyContinue)) {
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
}
scoop bucket add local .
$updated = @()
foreach ($app in $criticalApps) {
Write-Host "Checking $app..." -ForegroundColor Cyan
$result = scoop checkver $app --force 2>&1
if ($result -match "->") {
Write-Host " Update found!" -ForegroundColor Green
$updated += $app
}
}
if ($updated.Count -gt 0) {
Write-Host "Updated apps: $($updated -join ', ')" -ForegroundColor Green
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "ci(critical): update $($updated -join ', ')"
git push
# Special exit code
exit 100
}