ci: Produce OCI archives and build on all branches #84
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: Build and deploy OSTree image | |
on: | |
push: | |
paths-ignore: | |
- "README.md" | |
workflow_dispatch: | |
schedule: | |
# every sunday at 00:00 | |
- cron: "0 0 * * 0" | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: | |
- x86_64 | |
- aarch64 | |
variant: | |
- ultramarine/base | |
- ultramarine/flagship | |
- ultramarine/gnome | |
- ultramarine/pantheon | |
- ultramarine/plasma | |
- tau/home | |
runs-on: ${{ matrix.arch == 'aarch64' && 'ARM64' || 'ubuntu-latest' }} | |
permissions: | |
contents: read | |
packages: write | |
container: | |
image: ghcr.io/terrapkg/builder:f38 | |
options: --cap-add=SYS_ADMIN --privileged | |
volumes: | |
- ostree_cache:/var/cache/compose | |
steps: | |
- name: DNF Cache | |
uses: actions/cache@v3 | |
if: always() | |
with: | |
path: /var/cache/dnf | |
key: dnf | |
- name: Install dependencies | |
id: deps | |
run: | | |
sudo dnf install -y podman moby-engine rpm-ostree melody just python3-pip pkg-config wget ostree ostree-devel rpm-ostree git hfsplus-tools flatpak dbus dbus-daemon rpmdevtools make mock selinux-policy python3-pip jq @development-tools gcc cairo-devel python3-devel 'pkgconfig(gobject-introspection-1.0)' 'pkgconfig(cairo-gobject)' 'dnf-command(config-manager)' | |
- name: Install python dependencies | |
id: deps-py | |
run: pip install yq | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build OSTree | |
id: build | |
run: just build-image ${{ matrix.variant }} | |
- name: Upload OCI image as artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.variant }}-${{ matrix.arch }}-oci | |
path: images/* |