diff --git a/.github/actions/bluebuild/action.yml b/.github/actions/bluebuild/action.yml index 794d42c..a761c18 100644 --- a/.github/actions/bluebuild/action.yml +++ b/.github/actions/bluebuild/action.yml @@ -35,7 +35,7 @@ inputs: Whether to run the unwanted software remover to maximize build space in the GitHub builder. Disable this with 'false' if your image doesn't take up a lot of space and you'd rather have shorter build times. required: false - default: 'true' + default: 'false' use_unstable_cli: description: | If true, this action pulls the `main` branch of blue-build/cli instead of the stable version the current action version is configured to use by default. @@ -59,19 +59,6 @@ inputs: Example: `ublue-os` required: false default: ${{ github.repository_owner }} - use_cache: - description: | - Make use of docker buildx cache. This is an experimental feature of docker buildx - so it isn't guaranteed to work. - Input must match the string 'true' for the step to be enabled. - required: false - default: 'true' - squash: - description: | - Uses buildah to squash the build's layers into a single layer. Use of this option - disables cache. - required: false - default: 'false' working_directory: description: | Changes working directory for whole build. @@ -83,34 +70,11 @@ runs: using: "composite" steps: # building custom images might take a lot of space, - # so it's best to remove unneeded softawre + # so it's best to remove unneeded software - name: Maximize build space uses: jlumbroso/free-disk-space@v1.3.1 if: ${{ inputs.maximize_build_space == 'true' }} - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - if: ${{ inputs.squash != 'true' }} - with: - install: true - driver: docker-container - cache-binary: ${{ inputs.use_cache }} - - # Installs the latest version of Podman - # that is compatible with BlueBuild - - name: Setup Podman - if: ${{ inputs.squash == 'true' }} - shell: bash - run: | - # from https://askubuntu.com/questions/1414446/whats-the-recommended-way-of-installing-podman-4-in-ubuntu-22-04 - ubuntu_version='22.04' - key_url="https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}/Release.key" - sources_url="https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}" - echo "deb $sources_url/ /" | sudo tee /etc/apt/sources.list.d/devel-kubic-libcontainers-unstable.list - curl -fsSL $key_url | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_kubic_libcontainers_unstable.gpg > /dev/null - sudo apt-get update - sudo apt-get install -y podman - - uses: sigstore/cosign-installer@v3.5.0 # clones user's repo @@ -144,20 +108,13 @@ runs: env: CLI_VERSION_TAG: ${{ steps.build_vars.outputs.cli_version }} run: | - docker create \ + podman create \ --name blue-build-installer \ ghcr.io/blue-build/cli${{ env.CLI_VERSION_TAG }} - docker cp blue-build-installer:/out/bluebuild /usr/local/bin/bluebuild - docker rm blue-build-installer + podman cp blue-build-installer:/out/bluebuild /usr/local/bin/bluebuild + podman rm blue-build-installer bluebuild --version - # Required in order for docker buildx to - # take advantage of the GHA cache API - - name: Expose GitHub Runtime - if: ${{ inputs.use_cache == 'true' && inputs.squash != 'true' }} - uses: crazy-max/ghaction-github-runtime@v3 - - # blue-build/cli does the heavy lifting - name: Build Image shell: bash @@ -170,15 +127,9 @@ runs: BB_REGISTRY: ${{ inputs.registry }} BB_REGISTRY_NAMESPACE: ${{ inputs.registry_namespace }} GH_PR_EVENT_NUMBER: ${{ inputs.pr_event_number }} - BB_BUILDKIT_CACHE_GHA: ${{ inputs.use_cache }} RECIPE_PATH: ${{ steps.build_vars.outputs.recipe_path }} RUST_LOG_STYLE: always CLICOLOR_FORCE: '1' run: | - BUILD_OPTS="--compression-format gzip" - - if [ "${{ inputs.squash }}" = "true" ]; then - BUILD_OPTS="--build-driver podman --squash $BUILD_OPTS" - fi - + BUILD_OPTS="--compression-format gzip --build-driver podman --run-driver podman" bluebuild build -v --push ${BUILD_OPTS} ${RECIPE_PATH} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index deca101..8318465 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,6 +28,9 @@ jobs: recipe: # !! Add your recipes here - fedora-kinoite-laptop.yml + container: + image: ghcr.io/prydom/ostree-buildroot:rawhide + options: --privileged steps: - name: Checkout repo uses: actions/checkout@v4 @@ -39,7 +42,7 @@ jobs: registry_token: ${{ github.token }} pr_event_number: ${{ github.event.number }} use_unstable_cli: true - cli_version: ":20d1950530218118c6c0fff1fe5ff6b37e5d1586-installer" + cli_version: ":v0.8.18-installer" rpm-ostree-rechunk: name: rpm-ostree re-encapsulate runs-on: ubuntu-latest