From 9899ce98f74f0147543f0aeaf5698d8956358c59 Mon Sep 17 00:00:00 2001 From: thislight Date: Sun, 29 Jun 2025 18:53:03 +0800 Subject: [PATCH] build-image: remove hard-coded hosts from containerfiles --- .forgejo/workflows/build-fedora-41.yml | 5 +---- fedora-41/Containerfile | 2 +- shared/build-image.ts | 6 ++++++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/build-fedora-41.yml b/.forgejo/workflows/build-fedora-41.yml index b84c5d8..644f62a 100644 --- a/.forgejo/workflows/build-fedora-41.yml +++ b/.forgejo/workflows/build-fedora-41.yml @@ -1,6 +1,3 @@ - -$schema: https://github.com/SchemaStore/schemastore/raw/master/src/schemas/json/github-workflow.json - on: push: branches: ['master'] @@ -15,7 +12,7 @@ on: jobs: build: - runs-on: fedora-40 + runs-on: fedora-41 steps: - name: Checkout uses: actions/checkout@v3 diff --git a/fedora-41/Containerfile b/fedora-41/Containerfile index 2fd4651..16529f3 100644 --- a/fedora-41/Containerfile +++ b/fedora-41/Containerfile @@ -1,4 +1,4 @@ -FROM code.lightstands.xyz/standcoded/fedora-minimal:41 +FROM localhost/runner-images/fedora-minimal:41 RUN dnf install -y --setopt install_weak_deps=False sqlite-devel binutils diff --git a/shared/build-image.ts b/shared/build-image.ts index 7d1775e..14979fc 100644 --- a/shared/build-image.ts +++ b/shared/build-image.ts @@ -7,6 +7,10 @@ const dirName = process.argv[3]; const arches = process.argv[4].split(","); const pathToDnfCache = process.env["DNF_CACHE_PATH"]; +const stag = tag.split('/'); +const imageName = stag[stag.length - 1]; +const tempTag = `localhost/runner-images/${imageName}`; + await $`buildah manifest create ${tag}`; for (const arch of arches) { await $`buildah build --arch ${arch} \ @@ -15,3 +19,5 @@ for (const arch of arches) { --manifest ${tag} \ --volume ${sharedDir}:/imgbuild:z ${dirName}`; } + +await $`buildah tag ${tag} ${tempTag}`;