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

Build PostmarketOS for QEMU #13

Build PostmarketOS for QEMU

Build PostmarketOS for QEMU #13

Workflow file for this run

name: "Build PostmarketOS for QEMU-x86_64"
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 "::set-output name=date::$(date +'%Y-%m-%d')"
- 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/boot/ -print | zip postmarketos-qemu-amd64.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: ${{ steps.date.outputs.date }}
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.zip
asset_name: postmarketos-qemu-amd64.zip
asset_content_type: application/zip