Use alpine for icepak push #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Alpine' | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
strategy: | |
matrix: | |
release: [ | |
{distro: "alpine", version: "3.16"}, | |
{distro: "alpine", version: "3.17"}, | |
{distro: "alpine", version: "3.18"}, | |
{distro: "alpine", version: "3.19"}, | |
{distro: "alpine", version: "edge"} | |
] | |
os: [ | |
{arch: "aarch64", builder: "nscloud-ubuntu-22.04-arm64-2x8"}, | |
{arch: "x86_64", builder: "warp-ubuntu-latest-x64-2x"} | |
] | |
runs-on: ${{matrix.os.builder}} | |
env: | |
ImageOS: ubuntu22 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup IcePAK | |
uses: upmaru/icepak@develop | |
with: | |
alpine: v3.19 | |
arch: ${{matrix.os.arch}} | |
- name: Generate Serial | |
id: generate-serial | |
run: | | |
echo "serial=$(date +'%Y%m%d')-$GITHUB_RUN_NUMBER" >> $GITHUB_OUTPUT | |
- name: Setup Distrobuilder | |
run: | | |
sudo snap install distrobuilder --classic | |
- name: Build Image | |
run: | | |
sudo distrobuilder build-incus images/${{matrix.release.distro}}.yml rootfs -o image.serial=${{ steps.generate-serial.outputs.serial }} -o image.architecture=${{matrix.os.arch}} -o image.release=${{matrix.release.version}} | |
- name: Push | |
run: | | |
icepak push --path rootfs --serial ${{ steps.generate-serial.outputs.serial }} --os ${{matrix.release.distro}} --arch ${{matrix.os.arch}} --release ${{matrix.release.version}} --variant default | |
shell: alpine.sh {0} | |
env: | |
POLAR_AUTH_TOKEN: ${{ secrets.POLAR_AUTH_TOKEN }} | |
POLAR_ENDPOINT: ${{ vars.POLAR_ENDPOINT }} |