Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Slinet6056 committed Sep 6, 2024
1 parent cfe882d commit 7485ac3
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ with:
repo_path: repo # optional
```
<!-- For a more comprehensive example, check out the [demo workflow file](https://github.com/Slinet6056/AUR/blob/master/.github/workflows/build.yml). -->
## Inputs
- `package_name`: Name of the package to build (required)
Expand All @@ -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/<package_name>` 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
Expand All @@ -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

Expand Down

0 comments on commit 7485ac3

Please sign in to comment.