-
-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (62 loc) · 2.23 KB
/
update-packages.yml
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
name: 🔃 Package Update
on:
schedule:
- cron: '30 18 * * *'
workflow_dispatch:
inputs:
parameters:
description: 'Parameters for updater'
required: false
jobs:
update-choco-packages:
runs-on: windows-latest
needs: update-aur-packages
steps:
- name: 📚 Checkout
uses: actions/checkout@v4
- name: 🛠️ Install & Import AU
shell: powershell
run: |
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module au
Import-Module au
- name: 🍫 Set Chocolatey api key
run: |
choco apikey --key ${{ secrets.CHOCO_API_KEY }} --source https://push.chocolatey.org/
- name: 🔧 Run update script
shell: powershell
run: |
$Env:au_Push = $true
.\update_all.ps1 ${{ github.event.inputs.parameters }}
- name: 🔃 Fetch newest repo version
run: |
git pull origin main
- name: 💄 Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'feat: 🔼 Update chocolatey packages'
commit_author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
branch: 'main'
get-aur-packages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: 🧬 Generate matrix
id: gen-matrix
run: |
matrix=$(find ./packages/ -type f -name '*PKGBUILD' -not -path '*spacedrive*' -not -path '*shfmt-bin*' | sed -r 's|/[^/]+$||' | sort | uniq | cut -f3 -d'/' | jq -R | jq -cs)
echo $matrix
echo "::set-output name=packages::$matrix"
outputs:
packages: ${{ steps.gen-matrix.outputs.packages }}
update-aur-packages:
name: 🚀 Publish updated packages
needs: get-aur-packages
uses: kamack38/packages/.github/workflows/_CD-AUR.yml@main
with:
packages: ${{ needs.get-aur-packages.outputs.packages }}
secrets:
AUR_SSH_PRIVATE_KEY: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
KNOWN_HOSTS: ${{ secrets.KNOWN_HOSTS }}
AUR_EMAIL: ${{ secrets.AUR_EMAIL }}
AUR_USERNAME: ${{ secrets.AUR_USERNAME }}