Skip to content

Conversation

@yoshi-taka
Copy link

CI speed improvement

https://github.com/jest-community/eslint-plugin-jest/actions/workflows/lint.yml

  • GHCR images (ghcr.io/danger/danger-js) are prebuilt and cached on GitHub-hosted runners
  • Completely removed Dockerfile-based builds

@G-Rath
Copy link
Collaborator

G-Rath commented Nov 15, 2025

Could you explain this change a bit more, ideally with some linkage to official documentation? My expectation is that GH already uses caching when appropriate for docker images, and doesn't build them every time.

I'm also not sure if this is supported by Renovate

@yoshi-taka
Copy link
Author

As you can see below, this PR runs noticeably faster, dropping from about one minute to twenty seconds compared with many other PRs.
image

If we look at what the previous action was doing, the below screenshot shows that it was performing a full Docker build.

image e.g. https://github.com/jest-community/eslint-plugin-jest/actions/runs/19342384594/job/55333811424#step:2:1

GitHub Actions has a behavior that many people are not aware of:
when you reference a repository with uses:, Actions builds a Docker image from that repository’s Dockerfile.

@yoshi-taka
Copy link
Author

Renovate is able to update pinned Docker digests, as documented here: https://docs.renovatebot.com/docker/#digest-pinning

@G-Rath
Copy link
Collaborator

G-Rath commented Nov 15, 2025

I understand it aims to speed up CI, but it's not clear to me if this is official, stable, trust worthy, etc which is why ideally I'd like some docs or a blog post

@yoshi-taka
Copy link
Author

danger-js has been publishing images to GHCR for quite some time.
https://github.com/danger/danger-js/pkgs/container/danger-js

The code that handles the publishing is here:
https://github.com/danger/danger-js/blob/main/.github/workflows/publish_package.yml

@yoshi-taka
Copy link
Author

This is the closest official reference I could find: https://github.com/danger/danger/blob/master/CHANGELOG.md#932

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants