Skip to content

Commit 68fad80

Browse files
committed
Upload to container registry to allow larger system images
1 parent 530e731 commit 68fad80

5 files changed

Lines changed: 15 additions & 157 deletions

File tree

.github/workflows/build-builder.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build docker container
22

33
env:
44
REGISTRY: ghcr.io
5-
IMAGE_NAME: ${{ github.repository }}
5+
BUILDER_IMAGE_NAME: ${{ github.repository_owner }}/builder
66

77
on:
88
workflow_dispatch:
@@ -24,7 +24,7 @@ jobs:
2424
id: meta
2525
uses: docker/metadata-action@v5
2626
with:
27-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
27+
images: ${{ env.REGISTRY }}/${{ env.BUILDER_IMAGE_NAME }}
2828
- name: Build and push Docker image
2929
uses: docker/build-push-action@v6
3030
with:

.github/workflows/build-system-image.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
name: Build ChimeraOS image
22
env:
33
REGISTRY: ghcr.io
4-
IMAGE_NAME: ${{ github.repository }}
4+
ARTIFACT_IMAGE_NAME: ${{ github.repository }}
5+
BUILDER_IMAGE_NAME: ${{ github.repository_owner }}/builder
56

67
on:
78
workflow_call:
@@ -33,12 +34,14 @@ jobs:
3334
sudo rm -rf /opt/hostedtoolcache
3435
sudo rm -rf /opt/az
3536
df -h
37+
- name: Install dependencies
38+
run: sudo snap install oras --classic
3639
- uses: actions/checkout@v4
3740
- name: Extract metadata (tags, labels) for Docker
3841
id: meta
3942
uses: docker/metadata-action@v5
4043
with:
41-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
44+
images: ${{ env.REGISTRY }}/${{ env.BUILDER_IMAGE_NAME }}
4245
- uses: actions/download-artifact@v4
4346
with:
4447
pattern: AUR-packages*
@@ -55,6 +58,11 @@ jobs:
5558
docker pull ${{ steps.meta.outputs.tags }}
5659
docker run -u root --rm --entrypoint=/workdir/build-image.sh -v $(pwd):/workdir -v $(pwd)/output:/output -v $GITHUB_OUTPUT:$GITHUB_OUTPUT -e "GITHUB_OUTPUT=$GITHUB_OUTPUT" --privileged=true ${{ steps.meta.outputs.tags }} $(echo ${GITHUB_SHA} | cut -c1-7)
5760
echo -e "$(docker inspect --format='{{index .RepoDigests 0}}' ${{ steps.meta.outputs.tags }})" > output/container.txt
61+
- name: Upload system image artifact
62+
id: upload_system_image_artifact
63+
run: |
64+
oras login --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} ${{ env.REGISTRY }}
65+
oras push ${{ env.REGISTRY }}/${{ env.ARTIFACT_IMAGE_NAME }}:${{ steps.build_image.outputs.version }} output/${{ steps.build_image.outputs.image_filename }}
5866
- name: Create release
5967
id: create_release
6068
uses: softprops/action-gh-release@v2
@@ -67,7 +75,6 @@ jobs:
6775
prerelease: true
6876
fail_on_unmatched_files: true
6977
files: |
70-
output/${{ steps.build_image.outputs.image_filename }}
7178
output/build_info.txt
7279
output/sha256sum.txt
7380
output/container.txt

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: System image build
22

33
env:
44
REGISTRY: ghcr.io
5-
IMAGE_NAME: ${{ github.repository }}
5+
BUILDER_IMAGE_NAME: ${{ github.repository_owner }}/builder
66

77
on:
88
push:
@@ -46,7 +46,7 @@ jobs:
4646
id: meta
4747
uses: docker/metadata-action@v5
4848
with:
49-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
49+
images: ${{ env.REGISTRY }}/${{ env.BUILDER_IMAGE_NAME }}
5050
- name: Build packages
5151
run: |
5252
docker pull ${{ steps.meta.outputs.tags }}
@@ -73,7 +73,7 @@ jobs:
7373
id: meta
7474
uses: docker/metadata-action@v5
7575
with:
76-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
76+
images: ${{ env.REGISTRY }}/${{ env.BUILDER_IMAGE_NAME }}
7777
- name: Build packages
7878
run: |
7979
docker pull ${{ steps.meta.outputs.tags }}

.github/workflows/release-branch.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/workflows/stable.yml

Lines changed: 0 additions & 97 deletions
This file was deleted.

0 commit comments

Comments
 (0)