Skip to content

πŸ”ƒ Package Update #994

πŸ”ƒ Package Update

πŸ”ƒ Package Update #994

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 }}