From 7485ac33e97f39d7cccf033d9416ede3b8f53aa4 Mon Sep 17 00:00:00 2001 From: Slinet6056 Date: Fri, 6 Sep 2024 23:46:17 +0800 Subject: [PATCH] Update README.md --- README.md | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 742a925..e265b88 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,6 @@ with: repo_path: repo # optional ``` - - ## Inputs - `package_name`: Name of the package to build (required) @@ -26,6 +24,24 @@ with: - `repo_name`: Repository name (optional, for repository update) - `repo_path`: Repository path (optional, for repository update) +## How it works + +1. The action uses a Docker container based on the `archlinux:base-devel` image. +2. It sets up a build environment and creates a non-root user for building packages and signing them. +3. The specified package is built using `makepkg`. +4. The built package is signed using the provided GPG key. +5. If `repo_name` and `repo_path` are provided, the action updates the package repository. + +## Outputs + +After running this action, you can expect the following results: + +1. The specified package will be built and signed in the `pkgs_path/` directory. The built package (`.pkg.tar.zst`) and its signature (`.pkg.tar.zst.sig`) will be available in this directory. +2. If `repo_name` and `repo_path` are provided, the package repository will be updated with the new package. +3. If the repository is updated, the new repository database files will be available in the specified `repo_path`. + +These outputs can be utilized in subsequent steps of your workflow for various purposes. + ## Tips ### Use matrix to build multiple packages @@ -43,20 +59,12 @@ steps: gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }} ``` -## How it works - -1. The action uses a Docker container based on the `archlinux:base-devel` image. -2. It sets up a build environment and creates a non-root user for building packages. -3. The specified package is built using `makepkg`. -4. The built package is signed using the provided GPG key. -5. If `repo_name` and `repo_path` are provided, the action updates the package repository. - ## Notes - Ensure that your repository contains subdirectories named after each `package_name` within the `pkgs_path` (default: "."). Each subdirectory should contain the necessary `PKGBUILD` file. - The GPG private key and passphrase should be stored as secrets in your GitHub repository. - When updating a repository, the `repo_path` will be automatically created if it doesn't exist. -- Automatic repository update may cause conflicts when using matrix strategy. +- Automatic repository update may cause conflicts when using matrix strategy. To resolve this issue, you can use the [Matrix Lock](https://github.com/marketplace/actions/matrix-lock) action. This action allows you to control the execution order of jobs, preventing conflicts during repository updates. For a specific implementation example, please refer to [this workflow file](https://github.com/Slinet6056/AUR/blob/master/.github/workflows/build.yml). ## License