Skip to content

πŸš€ Update & publish AUR package #36

πŸš€ Update & publish AUR package

πŸš€ Update & publish AUR package #36

Workflow file for this run

name: πŸš€ Update & publish AUR package
on:
workflow_call:
inputs:
packages:
description: Name of the package
required: true
type: string
secrets:
AUR_SSH_PRIVATE_KEY:
description: Private key for the AUR account
required: true
KNOWN_HOSTS:
description: Known hosts file
required: true
AUR_EMAIL:
description: Email address for the AUR account
required: true
AUR_USERNAME:
description: Username for the AUR account
required: true
workflow_dispatch:
inputs:
packages:
description: Name of the package
required: true
type: choice
options:
- "['asus-numberpad-driver-git']"
- "['dwall-git']"
- "['kawaiki-grub2-themes-git']"
- "['mkinitcpio-colors-git']"
- "['oh-my-posh-bin']"
- "['openasar-git']"
- "['sqruff-bin']"
- "['termdbms-git']"
- "['up-metro-for-steam-skin']"
force:
description: Force package push
type: boolean
required: false
jobs:
aur:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pkgname: ${{ fromJson(format('{0}{1}', github.event.inputs.packages, inputs.packages)) }}
steps:
- name: πŸ“š Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: πŸ”„ Update package
uses: kamack38/pkgbuild-update@main
id: update
with:
path: packages/${{ matrix.pkgname }}
updpkgsums: true
aur_pkgname: ${{ matrix.pkgname }}
aur_commit_username: ${{ secrets.AUR_USERNAME }}
aur_commit_email: ${{ secrets.AUR_EMAIL }}
aur_ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
- name: πŸ”ƒ Fetch newest repo version
run: git pull
- name: πŸ€” Check if package updated
if: ${{ github.event.inputs.packages != true }}
run: |
if [[ $(git status --porcelain) ]]; then echo "UPDATED=true" >> $GITHUB_ENV; else echo "UPDATED=false" >> $GITHUB_ENV; fi
- name: πŸ’„ Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'feat: πŸ”Ό Update ${{ matrix.pkgname }} from ${{ steps.update.outputs.old_pkgver }} to ${{ steps.update.outputs.new_pkgver }}'
commit_author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>