mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-02-19 12:41:05 +00:00
feat(just): Use image identifiers for signing
Allows us to sign images built with Lorax
This commit is contained in:
parent
603fc0d5fc
commit
58238666ba
@ -284,27 +284,6 @@ _toggle_wayland:
|
||||
fi
|
||||
|
||||
sign-image:
|
||||
rpm-ostree rebase ostree-image-signed:$(just --unstable _get-image)
|
||||
|
||||
_get-image:
|
||||
#!/usr/bin/env python
|
||||
from json import loads
|
||||
from subprocess import PIPE, run
|
||||
|
||||
"""Pull deployment status via rpm-ostree"""
|
||||
status = "rpm-ostree status --json"
|
||||
out = run(status, shell=True, stdout=PIPE).stdout
|
||||
|
||||
"""Parse current image"""
|
||||
deployments = loads(out)["deployments"][0]
|
||||
current_image = deployments["container-image-reference"].split(":", 1)
|
||||
|
||||
"""Dissect current image to form URL to latest image"""
|
||||
protocol = "docker://"
|
||||
url = current_image[1]
|
||||
|
||||
"""Add protocol if URL doesn't contain it"""
|
||||
if protocol not in url:
|
||||
url = protocol + url
|
||||
|
||||
print(url)
|
||||
#!/usr/bin/env bash
|
||||
source /etc/default/bazzite
|
||||
rpm-ostree rebase ostree-image-signed:docker://ghcr.io/${IMAGE_VENDOR}/${IMAGE_NAME}:${FEDORA_MAJOR_VERSION}
|
||||
|
@ -193,27 +193,6 @@ unhide-grub:
|
||||
fi
|
||||
|
||||
sign-image:
|
||||
rpm-ostree rebase ostree-image-signed:$(just --unstable _get-image)
|
||||
|
||||
_get-image:
|
||||
#!/usr/bin/env python
|
||||
from json import loads
|
||||
from subprocess import PIPE, run
|
||||
|
||||
"""Pull deployment status via rpm-ostree"""
|
||||
status = "rpm-ostree status --json"
|
||||
out = run(status, shell=True, stdout=PIPE).stdout
|
||||
|
||||
"""Parse current image"""
|
||||
deployments = loads(out)["deployments"][0]
|
||||
current_image = deployments["container-image-reference"].split(":", 1)
|
||||
|
||||
"""Dissect current image to form URL to latest image"""
|
||||
protocol = "docker://"
|
||||
url = current_image[1]
|
||||
|
||||
"""Add protocol if URL doesn't contain it"""
|
||||
if protocol not in url:
|
||||
url = protocol + url
|
||||
|
||||
print(url)
|
||||
#!/usr/bin/env bash
|
||||
source /etc/default/bazzite
|
||||
rpm-ostree rebase ostree-image-signed:docker://ghcr.io/${IMAGE_VENDOR}/${IMAGE_NAME}:${FEDORA_MAJOR_VERSION}
|
||||
|
Loading…
x
Reference in New Issue
Block a user