1
0
Fork 0
mirror of https://github.com/JasonN3/build-container-installer.git synced 2025-12-25 10:57:55 +01:00

use archive

This commit is contained in:
Jason N. 2024-02-13 19:20:28 +00:00
parent f9e563fdf0
commit 8e63cee144
6 changed files with 5 additions and 92 deletions

View file

@ -13,47 +13,6 @@ env:
jobs: jobs:
build-docker_cache-container:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
# Checkout push-to-registry action GitHub repository
- name: Checkout Push to Registry action
uses: actions/checkout@v4
# Build image using Buildah action
- name: Build Image
id: build_image
uses: redhat-actions/buildah-build@v2
with:
containerfiles: |
./containers/docker_cache/Containerfile
context: containers/docker_cache
image: docker_cache
- name: Lowercase Registry
id: registry_case
uses: ASzc/change-string-case-action@v6
with:
string: ${{ env.IMAGE_REGISTRY }}
- name: Push To GHCR
uses: redhat-actions/push-to-registry@v2
id: push
env:
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ github.token }}
with:
image: ${{ steps.build_image.outputs.image }}
tags: latest
registry: ${{ steps.registry_case.outputs.lowercase }}
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASSWORD }}
extra-args: |
--disable-content-trust
build-and-push-iso: build-and-push-iso:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: needs:
@ -61,15 +20,6 @@ jobs:
container: container:
image: fedora:39 image: fedora:39
options: "--privileged" options: "--privileged"
volumes:
- registry_cache:/registry_cache
services:
dockerregistry:
image: ghcr.io/jasonn3/docker_cache:latest
ports:
- 5000:5000
volumes:
- registry_cache:/var/lib/registry
permissions: permissions:
contents: read contents: read
packages: write packages: write
@ -88,22 +38,10 @@ jobs:
with: with:
submodules: recursive submodules: recursive
- name: Mark local registry as http
run: |
cat << EOF >> /etc/containers/registries.conf
[[registry]]
location = "dockerregistry:5000"
insecure = true
EOF
- name: Download container to cache - name: Download container to cache
run: | run: |
podman pull dockerregistry:5000/ublue-os/base-main:39 podman pull ghcr.io/ublue-os/base-main:39
podman rmi dockerregistry:5000/ublue-os/base-main:39 podman save --format oci-archive -o base-main.tar ghcr.io/ublue-os/base-main:39
- name: Show downloaded files
run: |
find /registry_cache
- name: Create boot.iso - name: Create boot.iso
env: env:

View file

@ -1,3 +0,0 @@
FROM docker.io/library/registry:2
ADD config.yml /etc/docker/registry/config.yml

View file

@ -1,18 +0,0 @@
version: 0.1
log:
fields:
service: registry
storage:
filesystem:
rootdirectory: /var/lib/registry
http:
addr: :5000
headers:
X-Content-Type-Options: [nosniff]
health:
storagedriver:
enabled: true
interval: 10s
threshold: 3
proxy:
remoteurl: https://ghcr.io

View file

@ -1,2 +1,2 @@
append usr/share/anaconda/interactive-defaults.ks ostreecontainer --url=ghcr.io/ublue-os/base-main:39 append usr/share/anaconda/interactive-defaults.ks ostreecontainer --remote=ghcr.io/ublue-os/base-main:39 --url /run/install/repo/base-main.tar --transport oci-archive

View file

@ -6,10 +6,6 @@ echo "-boot_image any replay"
echo "-volid Fedora-S-dvd-x86_64-39" echo "-volid Fedora-S-dvd-x86_64-39"
echo "-joliet on" echo "-joliet on"
echo "-compliance joliet_long_names" echo "-compliance joliet_long_names"
cache_files=$(find /registry_cache) echo "-map $(pwd)/base-main.tar base-main.tar"
for file in ${cache_files} echo "-chmod 0444 base-main.tar"
do
echo "-map $(pwd)${file} ${file}"
echo "-chmod 0444 ${file}"
done
echo "-end" echo "-end"