forked from coreos/bootupd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: CI | ||
|
||
permissions: | ||
actions: read | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
workflow_dispatch: {} | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
c9s-bootc-e2e: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Cache Dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
key: "build-c9s" | ||
- name: Buildah Action | ||
uses: redhat-actions/buildah-build@v2 | ||
with: | ||
image: localhost/bootupd | ||
containerfiles: | | ||
./ci/Containerfile.c9s | ||
- name: bootc install | ||
run: | | ||
set -xeuo pipefail | ||
sudo podman run --rm -ti --privileged -v /:/target --pid=host --security-opt label=disable \ | ||
-v /var/lib/containers:/var/lib/containers \ | ||
localhost/bootupd bootc install to-filesystem \ | ||
--disable-selinux --replace=alongside /target |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# This container build is just a demo effectively; it shows how one might | ||
# build bootc in a container flow, using Fedora ELN as the target. | ||
FROM quay.io/centos/centos:stream9 as build | ||
RUN dnf -y install dnf-utils && dnf builddep -y rust-bootupd | ||
COPY . /build | ||
WORKDIR /build | ||
# See https://www.reddit.com/r/rust/comments/126xeyx/exploring_the_problem_of_faster_cargo_docker/ | ||
# We aren't using the full recommendations there, just the simple bits. | ||
RUN --mount=type=cache,target=/build/target --mount=type=cache,target=/var/roothome make && make bin-archive && mkdir -p /out && cp target/bootupd.tar.zst /out | ||
|
||
FROM quay.io/centos-bootc/centos-bootc:stream9 | ||
COPY --from=build /out/bootupd.tar.zst /tmp | ||
RUN tar -C / --zstd -xvf /tmp/bootupd.tar.zst && rm -vf /tmp/* |