# AUR Package Update Automation This repository contains GitHub Actions workflow that automatically checks and updates AUR packages by monitoring upstream GitHub repositories for new releases. ## Features - Daily automated version checks - Support for multiple AUR packages - Flexible version detection (releases or tags) - Custom version pattern matching - Pre and post update script hooks - GPG signing support - Skip patterns for beta/RC versions - Error handling and logging - Manual trigger option - Configurable per-package settings ## Setup 1. Clone this repository 2. Configure your GitHub repository secrets 3. Update the `aur-packages.yml` configuration file 4. Enable GitHub Actions for your repository ### Required GitHub Secrets Add the following secrets to your GitHub repository (Settings → Secrets and variables → Actions → New repository secret): - `GIT_AUTHOR_NAME`: Your Git author name - `GIT_AUTHOR_EMAIL`: Your Git author email - `GIT_COMMITTER_NAME`: Your Git committer name - `GIT_COMMITTER_EMAIL`: Your Git committer email - `GPG_PRIVATE_KEY`: Your GPG private key in ASCII armor format ```bash # Export your GPG key gpg --armor --export-secret-keys YOUR_KEY_ID ``` - `GPG_KEY_ID`: Your GPG key ID - `GITHUB_TOKEN`: A GitHub personal access token with `repo` scope - `SSH_PRIVATE_KEY`: Your SSH private key for git operations ```bash # Export your SSH key cat ~/.ssh/id_rsa ``` ## Configuration ### Package Configuration Edit `aur-packages.yml` to configure your packages: ```yaml # Configuration for AUR package updates signing_key: "YOUR_GPG_KEY_ID" packages: package-name: # Required: GitHub repository to check for updates github_repo: "owner/repo" # Required: Version detection method ('release' or 'tag') version_method: "release" # Required: Path to PKGBUILD relative to repository root pkgbuild_path: "package-name/PKGBUILD" # Optional: Custom version pattern regex version_pattern: "v(\\d+\\.\\d+\\.\\d+)" # Optional: Custom version extraction command version_command: "curl -s https://api.example.com/version" # Optional: Skip specific version patterns skip_patterns: - ".*-beta.*" - ".*-rc.*" # Optional: Custom update scripts pre_update_script: "./pre-update.sh" post_update_script: "./post-update.sh" ``` ### Configuration Options | Option | Description | Required | |--------|-------------|----------| | `github_repo` | GitHub repository in format "owner/repo" | Yes | | `version_method` | How to detect versions: `release` or `tag` | Yes | | `pkgbuild_path` | Path to the PKGBUILD file | Yes | | `version_pattern` | Regex pattern to extract version from tags/releases | No | | `version_command` | Custom command to get version | No | | `skip_patterns` | List of version patterns to ignore | No | | `pre_update_script` | Script to run before updating PKGBUILD | No | | `post_update_script` | Script to run after updating PKGBUILD | No | ## Usage ### Automatic Updates The workflow runs automatically every day at 00:00 UTC. It will: 1. Check each configured package for updates 2. Update PKGBUILD and .SRCINFO if new versions are found 3. Commit and push changes with GPG signing 4. Skip any versions matching the skip patterns ### Manual Trigger You can manually trigger the workflow: 1. Go to the "Actions" tab in your repository 2. Select "AUR Package Update Check" 3. Click "Run workflow" 4. Select the branch and click "Run workflow" ### Logs and Monitoring - Check the Actions tab for workflow run history and logs - Each run will show which packages were checked and any updates made - Failed updates will be logged with error messages ## Example Configuration ```yaml signing_key: "1234567890ABCDEF" packages: my-awesome-tool: github_repo: "awesome/tool" version_method: "release" pkgbuild_path: "my-awesome-tool/PKGBUILD" version_pattern: "v(\\d+\\.\\d+\\.\\d+)" skip_patterns: - ".*-alpha.*" - ".*-beta.*" another-package: github_repo: "user/repo" version_method: "tag" pkgbuild_path: "another-package/PKGBUILD" pre_update_script: "./update-checksums.sh" ``` ## Contributing 1. Fork the repository 2. Create a feature branch 3. Commit your changes 4. Push to the branch 5. Create a Pull Request ## License This project is licensed under the MIT License - see the LICENSE file for details.