Skip to content

GitHub Action that builds and releases Alpine Linux packages to GitHub pages

License

Notifications You must be signed in to change notification settings

ivanvc/abuild-releaser-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

abuild releaser action

Lint

GitHub action to build and release to GitHub pages Alpine Linux aport packages contained in a repository.

Pre-requisites

First, follow the Alpine Linux guide on Creating an Alpine Package. Make sure to generate a RSA key by using abuild-keygen -a -i. Save the public and private keys, and set them as the repository secrets: RSA_PUBLIC_KEY and RSA_PRIVATE_KEY. This key will be used to sign the packages, and the build process will place the public key in the gh-pages branch.

NOTE: This action will find all of the APKBUILD files in the repository if packages_dir is not specified, and will build all of these packages. Therefore, you should only have APKBUILD files from the packages you want to publish, or provide the packages_dir option.

Usage

- uses: ivanvc/abuild-releaser-action@main
with:
  # The following fields are required.
  # The author to use for the released apk packages.
  author: ''

  # The RSA public key used to sign the packages, set it as a secret.
  rsa_public_key: ''

  # The RSA private key used to sign the packages, set it as a secret.
  rsa_private_key: ''

  # The rest of the fields are optional.
  # The commit message when updating the gh-pages branch.
  commit_message: ''

  # Generate multiple index pages, one per directory.
  # Default: false
  generate_index_pages: ''

  # Generate a single index page.
  # Default: true
  generate_single_index_page: ''

  # Override the index page template with a file that exists in the gh-pages
  # branch. If the file doesn't exist, or it's not provided, it will use the
  # default index.html.tpl.
  index_page_template: ''

  # Release only the packages from the provided directories, release all of them
  # if this is not provided.
  packages_dir: ''

  # Alpine branch (release): vMAJOR.MINOR, latest-stable or edge.
  # Default: edge
  alpine_branch: ''

Refer to action.yml for the complete documentation.

Example usage

Release all packages in the repository:

name: Release

on:
  push:
    branches:
      - main

permissions:
  contents: write

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: ivanvc/abuild-releaser-action@v1.1.0
        with:
          author: John Doe <john@example.com>
          rsa_public_key: ${{ secrets.RSA_PUBLIC_KEY }}
          rsa_private_key: ${{ secrets.RSA_PRIVATE_KEY }}

Release only the packages inside the testing directory, and community/docker:

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: ivanvc/abuild-releaser-action@v1.0.0
        with:
          author: John Doe <john@example.com>
          rsa_public_key: ${{ secrets.RSA_PUBLIC_KEY }}
          rsa_private_key: ${{ secrets.RSA_PRIVATE_KEY }}
          package_dirs: "testing/*,community/docker"

License

See LICENSE © Ivan Valdes