-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (47 loc) · 1.93 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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/ -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