github-actions-deploy-aur

repository·master·Indexed 41 days ago

https://github.com/ksxgithub/github-actions-deploy-aur

A GitHub Action to automate the publishing and updating of Arch User Repository (AUR) packages. It supports deploying via a PKGBUILD file, adding specific files using glob patterns with the assets input, or mirroring a directory using asset_dir.

Tokens
1.3K
Snippets
2
Records
3
Agent score
2%

What's inside github-actions-deploy-aur

  1. Manage AUR repository files using assets and asset_dir

    master

    You can control which files are uploaded to the AUR repository using two different strategies. Note that these are mutually exclusive with each other and with the pkgbuild input.

    Adding or Overwriting files with assets

    Use assets to provide newline-separated glob patterns for additional files.

    • Behavior: It only adds or overwrites files. It will not delete files from the AUR repository that are missing from your patterns.
    • Expansion: Patterns are expanded by bash during the copy process.

    Mirroring a directory with asset_dir

    Use asset_dir to specify a path to a directory that should act as the full source of truth for the AUR repository.

    • Behavior: It makes the AUR repository an exact mirror of the directory. Files present in the AUR repository but absent from asset_dir will be deleted.
    • Requirements: The asset_dir must contain the PKGBUILD.
    • Filtering: A .gitignore inside asset_dir is respected (via rsync), though complex negation patterns may behave slightly differently than standard git semantics.
  2. Publish an AUR package via GitHub Actions

    master

    Use KSXGitHub/github-actions-deploy-aur to automate the deployment of Arch User Repository (AUR) packages. This action requires you to provide a PKGBUILD (either via a path or within a directory) and credentials for committing to the AUR repository.

    Important Requirements:

    • You must generate the PKGBUILD yourself in a previous step; this action does not generate it.
    • You must provide an ssh_private_key that has access to the AUR package.
    • You must provide commit_username and commit_email for the git commit.
    name: aur-publish
    
    on: tags
    
    jobs:
      aur-publish:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v2
    
          - name: Generate PKGBUILD
            run: bash ./generate-pkgbuild.bash
    
          - name: Publish AUR package
            uses: KSXGitHub/github-actions-deploy-aur@<TAG>
            with:
              pkgname: my-awesome-package
              pkgbuild: ./PKGBUILD
              commit_username: ${{ secrets.AUR_USERNAME }}
              commit_email: ${{ secrets.AUR_EMAIL }}
              ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
              commit_message: Update AUR package
              ssh_keyscan_types: rsa,ecdsa,ed25519
  3. Reference: GitHub Action Inputs

    master

    The following inputs are available for the KSXGitHub/github-actions-deploy-aur action.

    ### Required Inputs
    - `pkgname`: AUR package name.
    - `pkgbuild`: Path to PKGBUILD file (required unless `asset_dir` is specified).
    - `commit_username`: Username to use when creating the new commit.
    - `commit_email`: Email to use when creating the new commit.
    - `ssh_private_key`: Private key with access to the AUR package.
    
    ### Optional Inputs
    - `assets`: Newline-separated glob patterns for additional files (adds/overwrites only).
    - `asset_dir`: Path to a directory that mirrors the AUR repository (exact mirror; must contain `PKGBUILD`; mutually exclusive with `pkgbuild` and `assets`).
    - `updpkgsums`: Update checksums using `updpkgsums`.
    - `test`: Check that PKGBUILD could be built.
    - `test_flags`: Command line flags for `makepkg` (default: `--clean --cleanbuild --nodeps`).
    - `post_process`: A line of commands to execute after processing the package.
    - `commit_message`: Commit message to use.
    - `allow_empty_commits`: Allow commits with no change (default: `false`).
    - `force_push`: Use `--force` when pushing to the AUR (default: `false`).
    - `ssh_keyscan_types`: Comma-separated list of types for `aur.archlinux.org` known hosts (e.g., `rsa,ecdsa,ed25519`).