packages/.github/workflows/package-updates.yml

65 lines
1.7 KiB
YAML

name: Package updates
on:
schedule:
- cron: '0 */1 * * *'
workflow_dispatch:
jobs:
update-packages:
if: github.repository == 'built-aur/packages'
runs-on: ubuntu-latest
container: ghcr.io/built-aur/packages:latest
steps:
- name: work around permission issue
run: git config --global --add safe.directory /__w/packages/packages
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GH_PUSH_TOKEN }}
- name: Setup GIT
run: |
git config --global user.name "MedzikUserBot"
git config --global user.email "rm99iv9s@duck.com"
- name: Install python
run: pacman -Syu --noconfirm python python-setuptools
- name: Setup SSH Keys
run: |
ssh-agent -a "${SSH_AUTH_SOCK}" > /dev/null
ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}"
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
- name: Auto Update
run: ./scripts/auto-update.sh
env:
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_COMMIT_PACKAGES: true
GIT_PUSH_PACKAGES: true
push-aur:
if: github.repository == 'built-aur/packages'
runs-on: ubuntu-latest
container: ghcr.io/built-aur/packages:latest
steps:
- name: work around permission issue
run: git config --global --add safe.directory /__w/packages/packages
- name: Checkout
uses: actions/checkout@v3
- name: Push to AUR
run: ./scripts/push-aur-entrypoint.sh
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
COMMIT_USER: "MedzikUserBot"
COMMIT_EMAIL: "rm99iv9s@duck.com"