lorisleiva / laravel-docker

🐳 Generic docker image for Laravel Applications
MIT License
934 stars 314 forks source link

Add packages workflow to build and push images #80

Closed lukasleitsch closed 2 years ago

lukasleitsch commented 2 years ago

Adds a workflow for GitHub Actions to build and push the images to the GitHub container Registry and Docker Hub.

Please review and merge the PR #79 first. This PR already includes the new image.

You have to set up the secrets DOCKERHUB_USERNAME and DOCKERHUB_TOKEN that the action can log in to your Docker Hub account.

Currently, only the tags 7.3, 7.4, 8.0 and 8.1 will be pushed.

lorisleiva commented 2 years ago

Thanks for that! I've got a few questions:

lukasleitsch commented 2 years ago
  • Are the DOCKERHUB_* variables simply my actual username and password or do I need to generate some sort of API token on DockerHub?

I guess no. Please have a look to this page: https://docs.docker.com/docker-hub/access-tokens/

  • Is the GITHUB_TOKEN variable automatically availble?

Yes.

  • Can we also support the stable and latest tags (on top of 8.1, 8.0, etc.)? latest should refer to the latest version available (currently, 8.1) and stable should refer to the latest version that has every dependency needed by the image (currently, 8.1 as well by the looks of it).

I updated the workflow. Due PHP 8.1 is not released yet, I would suggest to use PHP 8.0 for latest and stable

lorisleiva commented 2 years ago

Okay I've added the DOCKERHUB_* secrets on the repository so let's see if it works. 😊

lorisleiva commented 2 years ago

It worked beautifully! Thank you so much, that's going to be a massive help going forward! 🍻

Capture 2021-10-21T09 40 47@2x Capture 2021-10-21T09 40 30@2x
lukasleitsch commented 2 years ago

Looks awesome. :)