-
Notifications
You must be signed in to change notification settings - Fork 8
Updating the OpenShift Actions Runners
Updating the runners and the runner chart is almost fully automated by a few Actions workflows.
Both the chart and the runners should be semantically versioned, and follow the exact same tagging rules as Actions. This includes rolling forward tags that "include" the new tag release.
Image and chart versions do not have to be kept in lock-step, but their major versions should always be compatible with one another. IE, if a chart v2
is ever needed, an image v2
should be released too, even if no changes to the images are required.
- The runner images are updated by this workflow
- Please refer to the
Determine changed directories
workflow step to understand why not all images are built every time. - The images are pushed to https://quay.io/organization/redhat-github-actions
- When a commit is pushed to
main
, the updated image(s) are pushed to thelatest
tag. - When a commit is pushed to any other branch, the updated image(s) are tagged with that branch name.
- When a tag is pushed, the update image(s) are pushed with that tag.
- The runner chart is updated by this workflow which packages the chart as a Helm repository and pushes it to GitHub pages.
- It is not always required to update the chart if the images are updated, or vice-versa, but it usually is.
- For example, if new configuration through the environment is added to the images, a new value should be added to the chart to easily pass-through that value to the runner container.
By default, the chart and the runner installer both point to quay.io/redhat-github-actions/runner:v1
as the default image/tag to use.
Note that when the runner images are built, they pull the latest version of the GitHub runner determined by this script. So, the OpenShift runners only have their version of the GitHub runner updated when the OpenShift runners are built. Again, this is affected by the Determine changed directories
logic.
If you want to rebuild the runners in order to pick up a new version of the GitHub runner, you can use a Workflow Dispatch on the Update Images workflow. Make sure to test the images after, to make sure GitHub did not break anything. The runner version can be verified by looking at the .RUNNER_VERSION
file in the running container, or by checking the output of the "Set up job" step run at the beginning of each workflow.
You can perform an integration test of an updated version of both the chart and images by installing the chart as detailed in its readme. Just override the values that determine the image: --set runnerImage=quay.io/<you>/<your-image> --set runnerTag=<your-tag>
.
Then, run any workflow targeting your new self-hosted runner and make sure it executes.
The runner installer should also be tested each time there is an update to the images or chart. You can use the runner_image
and runner_tag
inputs to override the image to use, if necessary.