An open API service indexing awesome lists of open source software.

https://github.com/thewisker/aur-update

Github Action that updates AUR packages on release
https://github.com/thewisker/aur-update

action arch aur bash workflow yaml

Last synced: 3 months ago
JSON representation

Github Action that updates AUR packages on release

Awesome Lists containing this project

README

        

AUR Update







Updates AUR packages on release

Index



[Description][description]

[Usage][usage]

[Discussions][discussions]

[Support][support]

[Contributions][contributions]

[Code of Conduct][coc]

[Author][author]

Description []

This is a Github Action that updates AUR git packages on release.

Usage []

To use this **GitHub Action** you need to already have **initialized** the **AUR repository** and **uploaded** a first **version**.
The **pkgbase** must **not** end in `-git` for this action to work and to *differentiate* it from the *release* action which you can maintain with this action's twin [AUR Update Git][twin].

Once that has been taken care of, you need to create a **folder** in your GitHub **repository** were the AUR **packages** will be **stored** and **updated** (by default /aur). Inside said folder, you must **create** a **folder** named exactly as the **pkgbase** for each package you intend to maintain. Then, *optionally*, **fill** each package's folder with it's AUR **content** (PKGBUILD .SRCINFO ...).

After all this preparations have been done it is only left to **create** the **workflow** `.yml` file under `.github/workflows/`.

The `.yml` file needs certain **fields** to have specific **values** to work. These are:


Permissions to write to the repo

```yaml
permissions:
contents: write
```


Run the job on a priviledged Arch container

On the job element:

```yaml
runs-on: ubuntu-latest
container:
image: archlinux
options: --privileged
```

Run on release

```yaml
on:
release:
types: [published]
```

**Not** really **needed** but it is **intented** to work on release

Parameters

| Inputs | Default | Required | Description |
| ------ | ------- | -------- | ----------- |
| **aur_key** | no default | true | AUR **ssh** private **key** |
| **ref** | 'master' | false | Checkout **reference** |
| **username** | ${{ github.actor \|\| 'github-actions-bot'}} | false | Git **username** to use |
| **email** | '[email protected]' | false | Git **email** to use |
| **repo** | ${{ github.repository }} | false | **Repository**: user/repo_name |
| **repo_name** | ${{ github.event.repository.name }} | false | Repository **name** |
| **aur_folder** | ./aur | false | AUR files **folder** |
| **tag_name** | ${{ github.event.release.tag_name \|\| 'no-tag' }} | false | Release **tag name** for commit messages |

Examples

Basic

```yaml
name: AUR Update
on:
release:
types: [published]
permissions:
contents: write
jobs:
aur-update-git:
runs-on: ubuntu-latest
container:
image: archlinux
options: --privileged
steps:
- name: AUR Update
uses: TheWisker/aur-update@master
with:
aur_key: ${{ secrets.AUR_KEY }}
```

The most **basic** workflow file

Advanced

```yaml
name: AUR Update
run-name: AUR package update by ${{ github.actor }} release
on:
release:
types: [published]
permissions:
contents: write
concurrency:
group: "aur"
cancel-in-progress: true
jobs:
aur-update-git:
environment:
name: aur-packages
runs-on: ubuntu-latest
container:
image: archlinux
options: --privileged
steps:
- name: AUR Update
uses: TheWisker/aur-update@master
with:
aur_key: ${{ secrets.AUR_KEY }}
username: TheWisker
email: [email protected]
```

Specifies a **concurrency** group so if it is called multiple times at once it only runs the **last one**. It also specifies an **environment** to deploy to so you can, for example, add a **delay** to said environment so you can cancel the AUR **update** if there has been a mistake in the release. The environment can also be used to only **allow access** to the AUR_KEY **secret** to it to minimize **security** risks.

Discussions []

Feel free to give any **ideas** for future **improvements** [here][discussion-ideas] and
ask any **questions** you have [here][discussion-questions].

Support []

If you have got any problems with the action please refer to the [SUPPORT.md][support] file.

Contributions []

First and foremost, all contributions are welcome!
The **steps** involved when making a contribution are **explained** in the [CONTRIBUTING.md][contributing] file.
We look forward to your contributions!

- The **contributors** list is located [here][contributors].

Code of Conduct []

This project follows the Contributor Covenant Code of Conduct.

Author []







TheWisker

[description]: https://github.com/TheWisker/aur-update#description-
[usage]: https://github.com/TheWisker/aur-update#usage-
[discussions]: https://github.com/TheWisker/aur-update#discussions-
[support]: https://github.com/TheWisker/aur-update#support-
[contributions]: https://github.com/TheWisker/aur-update#contributions-
[coc]: https://github.com/TheWisker/aur-update#code-of-conduct-
[author]: https://github.com/TheWisker/aur-update#author-
[twin]: https://github.com/TheWisker/aur-update-git
[discussion-ideas]: https://github.com/TheWisker/aur-update/discussions/categories/ideas
[discussion-questions]: https://github.com/TheWisker/aur-update/discussions/categories/q-a
[support]: ./SUPPORT.md
[contributing]: ./CONTRIBUTING.md
[contributors]: ./CONTRIBUTORS.md