I have a GitHub Actions plugin, which runs in a Docker container, as explained here. This is how people use my plugin in their workflows:
on:
push:
jobs:
foo:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: yegor256/foo-action@master
Every time a push happens in their repository, GitHub builds a new Docker image using Dockerfile
from my yegor256/foo-action
(fake name) repository. Obviously, I would like to use cache and avoid long Docker build
process on every push. How do I do this? I did read about caching of Docker builds inside repositories that use Dockerfile, but my case is different, I believe, because I need to cache the image of my plugin, not the repository that uses it.