title: GitHub workflow action with docker compose
body: <p>I'm trying to setup CI with GitHub Actions. My project is using docker &amp; docker-compose <em>(<a href="https://laradock.io/" rel="nofollow noreferrer">Laradock</a> actually, but that does not matter)</em>. It is the first time I'm setting up a workflow/ action with GitHub. I'm used to gitlab-ci... however</p>
  
  <p>In one step I'm running the docker containers:</p>
  
  <ul>
  <li><code>docker-compose up -d nginx mariadb</code></li>
  </ul>
  
  <pre><code>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
  </code></pre>
  
  <p>And in the next step I want to use the containers:</p>
  
  <ul>
  <li><code>docker-compose exec workspace composer install</code></li>
  </ul>
  
  <p>This fails with the message: <code>No container found for workspace_1</code></p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p><strong>EDIT</strong></p>
  
  <ul>
  <li>My full workflow: <a href="https://pastebin.com/hrfm4Sta" rel="nofollow noreferrer">tests.yml</a></li>
  <li><a href="https://github.com/laradock/laradock/blob/master/docker-compose.yml" rel="nofollow noreferrer">docker-compose.yml</a> from Laradock (it's the one my project uses too)</li>
  </ul>