An action to spin up your docker compose environment within GitHub Actions. Caching and Optimizing, sharing image between jobs by using localhost registry.
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup docker compose
uses: yu-ichiro/spin-up-docker-compose-action@v1
with:
file: compose.yml
# docker compose environment available belowfile: required string: the file to parse targets from, normally compose.yml. supported format:yamlcache-key: string: the cache key to use for saving build data. defaults to"default"shared: bool: whether to use local registry to share built images. this enablesregistryandlocalhost. defaults tofalseregistry: bool: whether to use a local registry or not. defaults tofalselocalhost: bool: whether to replace targets' registry to localhost or not.registrymust betrueto use this. defaults tofalsepull: bool: whether to pull targets' images. defaults to falsepull-opts: string: options to pass todocker compose pull.pullmust betrueto use this. defaults to""bake: bool: whether to bake targets. defaults tofalsepush: bool: whether to push targets' images after baking.bakemust betrueto use this. defaults tofalsebake-opts: string: options to pass todocker buildx bake.bakemust betrueto use this. defaults to""up: bool: whether to boot up docker compose. defaults totrueup-opts: string: options to pass todocker compose up.upmust betrueto use this. defaults to"-d"
example workflows are located in ./examples