Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable caching for container build CI/CD #15

Closed
obriencj opened this issue Oct 17, 2023 · 1 comment
Closed

Enable caching for container build CI/CD #15

obriencj opened this issue Oct 17, 2023 · 1 comment
Labels
infrastructure updates to actions or tooling

Comments

@obriencj
Copy link
Owner

obriencj commented Oct 17, 2023

Right now we rebuild every step of the container every time a pertinent change is committed. It would be better if we were to enable caching, so that unchanged steps could have their layers reused.

We would need to swap out redhat-actions/buildah-build for docker/build-push-action to take advantage of layer caching. Unfortunately this isn't part of the buildah action feature set currently.

Relevant blog on how to set up caching
https://depot.dev/blog/docker-layer-caching-in-github-actions

Current setup

      - name: Build image
        id: build
        uses: redhat-actions/buildah-build@v2
        with:
          image: ${{ env.image }}
          tags: ${{ steps.meta.outputs.tags }}
          labels: ${{ steps.meta.outputs.labels }}
          oci: true
          build-args: |
            GIT_COMMIT="${{ github.sha }}"
          containerfiles: |
            Containerfile

Open buildah-build question about same
redhat-actions/buildah-build#90

@obriencj obriencj added the infrastructure updates to actions or tooling label Oct 17, 2023
@obriencj
Copy link
Owner Author

obriencj commented Sep 2, 2024

closing as a non-issue, github doesn't care and I'm over-concerned with something immaterial.

@obriencj obriencj closed this as completed Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure updates to actions or tooling
Projects
None yet
Development

No branches or pull requests

1 participant