Quay supports connections to various code management systems. Through specialized build triggers, it can create new versions of containers on every code change. In this article, we'll explain how to create a trigger for a Github push. The procedure is the same for other systems.
- Log in to Quay and open your namespace/repository where you want to create a build trigger.
- Once there, click on "Builds" in the left pane. In the lower portion of the screen, click on "Create Build Trigger" and from the menu select "Github Repository Push"
- Select the organization that contains the repository that you want automatically built. Your own personal account on Github will also be shown as one of the namespaces that you can select.
- Select the repository that you want to build automatically. All repositories within the respective organization (namespace) will be shown. By default, Quay will hide repositories that were not used for some time. If you want to show them too, please ensure that "Hide stale repositories" is not checked.
- If you have multiple tags on your repository, Quay will by default build all tags as they are updated. If you don't want to build all tags, you can write a regular expression that would select only those tags that you need.
- Quay will list Dockerfiles that it detects in the repository. You need to either select one from the list or write a full path to a Dockerfile for the build to succeed. This is especially important if you want to build a container from a specific folder inside the repository. If a full path isn't selected, the build will fail with "Dockerfile not found" error.
- The build context is everything that constitutes your container. This can be a specific folder or can be a whole repository. Again, you need to specify the whole path to the define the build context.
- If you'd like to use a robot account to fetch content from the repository, then you can select it here. Otherwise, Quay will use your own account for fetching data. If your robot account does not have read access to the repository yet, it will automatically be added.
The build trigger will not be autostarted after creation. It will run only when changes to the repository are done inside Github (or other supported code management systems). You can run the trigger manually by clicking on the cogwheel on the right side of the screen and selecting "Run trigger now".
Other useful links: