I'm trying to setup CI with GitHub Actions. My project is using docker & docker-compose (Laradock actually, but that does not matter). It is the first time I'm setting up a workflow/ action with GitHub. I'm used to gitlab-ci... however
In one step I'm running the docker containers:
docker-compose up -d nginx mariadb
Creating laradock_mariadb_1 ...
Creating laradock_docker-in-docker_1 ...
Creating laradock_mariadb_1 ... done
Creating laradock_docker-in-docker_1 ... done
Creating laradock_workspace_1 ...
Creating laradock_workspace_1 ... done
Creating laradock_php-fpm_1 ...
Creating laradock_php-fpm_1 ... done
Creating laradock_nginx_1 ...
Creating laradock_nginx_1 ... done
And in the next step I want to use the containers:
docker-compose exec workspace composer install
This fails with the message: No container found for workspace_1
I am assuming I need to do something like creating an artifact for the first step and use it in the second step. At least that's something you'd do in GitLab CI.
I have not found any examples or solutions on the internet. I guess because GitHub's Actions is still a very new feature. So hopefully this thread will help other beginners as well.
EDIT
- My full workflow: tests.yml
- docker-compose.yml from Laradock (it's the one my project uses too)