PAKman is available to users as a GitHub Action. This guide will give you a breakdown of how PAKman works as a GitHub Action. When you use the Application setup in our app, you will also get the deployment.yml configuration for your GitHub Actions.
Build
In PAKman v8, the build and deploy steps are separate. This is to allow for a retry of the deployment without having to rebuild the package. This is important because the build process can be time consuming and we want to avoid unnecessary rebuilds.
Setup Pakman
The upmaru/pakman@v8 GitHub Action uses the setup-alpine action underneath. This basically sets up Alpine Linux as chroot inside the default ubuntu runtime in GitHub Actions. You can customize the version of Alpine using the with option.
Bootstrap
The pakman bootstrap command essentially reads the configuration from instellar.yml which is covered in the previous page, and renders all the configuration files necessary for the build.
We also pass the command 2 environment variables ABUILD_PRIVATE_KEY and ABUILD_PUBLIC_KEY. These keys were setup on your repository by OpsMaru automatically when you connected your repository 😉.
Build Package
In the next step, the Action will run abuild, which is the tool used for building Alpine packages.
Upload Artifact
This is a standard GitHub Action. All it does is upload the built artifact. The artifact is stored on GitHub’s storage, and will be evicted based on your configuration in GitHub. This step is important because it prevents rebuilding when we need to retry a deployment, as you’ll see in the next section.
Deploy
The deploy step pushes the package to your configured s3 compatible storage. This means your source code / builds never pass OpsMaru’s infrastructure.
Download Artifact
We download the artifact from the previous step.
Setup Pakman
Since we want to run PAKman in Alpine we’ll set up PAKman again. This is not time consuming because PAKman utilizes caching on GitHub Action. If PAKman is already built, it will simply load the cache. This is another feature of PAKman v8.
Merge Artifact
In this step we take all the artifacts built as separate X64 or, in the future, ARM architecture and we merge them into a single zip file.
Push
This is the final step, we push all the necessary built files to your storage on your infrastructure.