| title | Building FrankenPHP Docker Images with GitHub Actions |
|---|---|
| description | Use GitHub Actions to automatically build and publish FrankenPHP Docker images to a registry on pull requests, merges to main, and tagged releases. |
This repository builds and deploys the Docker image to Docker Hub on every approved pull request or on your own fork once setup.
In the repository settings, under secrets, add the following secrets:
REGISTRY_LOGIN_SERVER: The Docker registry to use (e.g.docker.io).REGISTRY_USERNAME: The username to use to log in to the registry (e.g.dunglas).REGISTRY_PASSWORD: The password to use to log in to the registry (e.g. an access key).IMAGE_NAME: The name of the image (e.g.dunglas/frankenphp).
- Create a Pull Request or push to your fork.
- GitHub Actions will build the image and run any tests.
- If the build is successful, the image will be pushed to the registry using the
pr-x, wherexis the PR number, as the tag.
- Once the Pull Request is merged, GitHub Actions will again run the tests and build a new image.
- If the build is successful, the
maintag will be updated in the Docker registry.
- Create a new tag in the repository.
- GitHub Actions will build the image and run any tests.
- If the build is successful, the image will be pushed to the registry using the tag name as the tag (e.g.
v1.2.3andv1.2will be created). - The
latesttag will also be updated.