Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Build PostmarketOS for QEMU #17

Build PostmarketOS for QEMU

Build PostmarketOS for QEMU #17

Workflow file for this run

name: "Build PostmarketOS for QEMU"
on:
workflow_dispatch:
jobs:
build:
permissions:
contents: write
pull-requests: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Get current date
id: date
run: echo "stamp={$(date +'+%s')}" >> $GITHUB_ENV
- name: Install tools
run: sudo apt update ; sudo apt -y install python-is-python3 python3-pip
- name: Install pmbootstrap
run: sudo apt update ; sudo pip3 install pmbootstrap
- name: Create work directory
run: mkdir -p /home/runner/.local/var/pmbootstrap
- name: Update pmbootstrap
run: pmbootstrap -c pmbootstrap.cfg -y -p pmbootstrap/cache_git/pmaports/ pull
- name: pmbootstrap install
run: pmbootstrap -c pmbootstrap.cfg -y -p pmbootstrap/cache_git/pmaports/ install --password postmarketos --no-sshd --filesystem btrfs
- name: Zip image
run: mkdir -p postmarketos-qemu-amd64/boot && sudo cp /home/runner/.local/var/pmbootstrap/chroot_native/home/pmos/rootfs/qemu-amd64.img postmarketos-qemu-amd64/ && cp /home/runner/.local/var/pmbootstrap/chroot_rootfs_qemu-amd64/boot/* postmarketos-qemu-amd64/boot/ && find postmarketos-qemu-amd64/ -print | zip postmarketos-qemu-amd64.${{ env.stamp }}.zip -@
- name: Create GH release
uses: actions/create-release@v1
id: create_release
with:
draft: true
prerelease: false
release_name: postmarketos-qemu-amd64
tag_name: ${{ env.stamp }}
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload zipped image to release artifacts
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: postmarketos-qemu-amd64.${{ env.stamp }}.zip
asset_name: postmarketos-qemu-amd64.zip
asset_content_type: application/zip