commit 719755bf21bf65110db40c59a96d86ea85ac2eb3 Author: Cory Sanin Date: Sun Nov 9 18:47:36 2025 -0500 initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..dbf0f79 --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ +# makepkg-build-action + +Gitea action for building pacman packages. Uses [Archery](https://git.sanin.dev/corysanin/archery) Docker images for building + +## Usage + +See [action.yml](action.yml). + +``` +- uses: https://git.sanin.dev/packages_infra/makepkg-build-action@v1 + with: + # Which distro to use for building. This will affect what repos are used for satisfying dependencies. + # Can be artix or arch + distro: 'artix' + + # Username intended to be used for publishing artifacts. Wihtout a proper post-entrypoint.sh script to + # utilize it, this input does nothing. + username: 'anonymous' + + # Token to use for authentication with artifact destination. Wihtout a proper post-entrypoint.sh script + # to utilize it, this input does nothing. + token: 'anonymous' +``` + +## Publishing + +See [publish.yml](https://git.sanin.dev/packages_infra/package_template/src/branch/master/.gitea/workflows/publish.yml). + +In order to publish an artifact, the repo must contain a `post-entrypoint.sh` script that performs publishing tasks. +The script has access to `$username` and `$token` that were passed in as action inputs. diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..9a49332 --- /dev/null +++ b/action.yml @@ -0,0 +1,23 @@ +name: Build package +description: build an Arch package via Docker + +inputs: + username: + description: 'Gitea username' + default: 'anonymous' + token: + description: 'Gitea PAT' + default: '' + distro: + description: Which distro to use for building, arch or artix + default: 'artix' + +runs: + using: 'docker' + image: 'docker://corysanin/archery:${{ inputs.distro }}' + env: + REPO: . + WORKSPACE: /workspace/${{ GITEA_REPOSITORY }}/ + POST: ${{ inputs.token }} + username: ${{ inputs.username }} + token: ${{ inputs.token }}