|
1 | 1 | # 🛠️ Alma9 GitHub Actions Runner |
2 | 2 |
|
3 | | -This repository manages the list of GitHub Actions **self-hosted runner versions** used by the USATLAS organization. |
4 | | -It includes an automated workflow that periodically checks for new runner releases and opens a pull request to update the pinned versions. |
| 3 | +This repository manages the list of GitHub Actions **self-hosted runner |
| 4 | +versions** used by the USATLAS organization. It includes an automated workflow |
| 5 | +that periodically checks for new runner releases and opens a pull request to |
| 6 | +update the pinned versions. |
5 | 7 |
|
6 | | -Any changes to the versions will build a new docker image deployed to ghcr.io. |
| 8 | +## 🔧 Configuration |
7 | 9 |
|
8 | | -## 🚀 How It Works |
| 10 | +The `.env` file stores the pinned versions used in the docker image, for |
| 11 | +example: |
9 | 12 |
|
10 | | -A scheduled GitHub Actions workflow runs the following process: |
| 13 | +``` |
| 14 | +RUNNER_VERSION=2.329.0 |
| 15 | +RUNNER_CONTAINER_HOOKS_VERSION=0.7.0 |
| 16 | +``` |
11 | 17 |
|
12 | | -1. **Fetch latest runner releases** from the official GitHub runners repository. |
13 | | -2. **Compare versions** against what is currently stored in `.env`. |
14 | | -3. If any versions have changed: |
| 18 | +These values are automatically updated by the automated version update workflow. |
15 | 19 |
|
16 | | - * A new branch named `update-runner-versions` is created. |
17 | | - * `.env` is updated with the new versions. |
18 | | - * A commit is created with a message summarizing exactly what changed. |
19 | | - * A pull request is automatically opened. |
| 20 | +## 🐳 Docker Image Publishing |
20 | 21 |
|
21 | | -## 📝 Example Commit Message |
| 22 | +Docker images for **Alma9-based GitHub Actions self-hosted runners** are |
| 23 | +automatically built and published when changes are pushed to the `main` branch. |
| 24 | +These provide an alternative to the standard Ubuntu/Debian-based runners. Pull |
| 25 | +requests trigger test builds to validate the Dockerfile, but images are only |
| 26 | +published from `main`. |
22 | 27 |
|
23 | | -When versions change, the commit message looks like: |
| 28 | +### Published Registries |
24 | 29 |
|
25 | | -``` |
26 | | -Update GitHub Actions runner versions |
| 30 | +Images are published to two container registries: |
27 | 31 |
|
28 | | -- Container Hooks: [0.7.0](https://github.com/actions/runner-container-hooks/releases/tag/v0.7.0) → [0.8.0](https://github.com/actions/runner-container-hooks/releases/tag/v0.8.0) |
29 | | -``` |
| 32 | +- **CERN GitLab Container Registry**: `gitlab-registry.cern.ch/usatlas/runner` |
| 33 | +- **GitHub Container Registry**: `ghcr.io/usatlas/actions-runner` |
30 | 34 |
|
31 | | -Commit messages only include entries for components that actually changed. |
| 35 | +### Available Tags |
32 | 36 |
|
33 | | -## 🔧 Configuration |
| 37 | +Multiple tags are created for each build to support different use cases: |
| 38 | + |
| 39 | +- **`latest`** - Always points to the most recent build from `main` |
| 40 | +- **`sha-{hash}`** - Immutable reference to a specific commit (e.g., |
| 41 | + `sha-592ad7bd`) |
| 42 | +- **`{RUNNER_VERSION}-latest`** - Latest build for a specific runner version |
| 43 | + (e.g., `2.329.0-latest`) |
| 44 | +- **`{RUNNER_VERSION}-{HOOKS_VERSION}`** - Fully pinned, reproducible version |
| 45 | + (e.g., `2.329.0-0.8.0`) |
| 46 | + |
| 47 | +### Versioning Concepts |
| 48 | + |
| 49 | +The Docker images use two independent version numbers: |
| 50 | + |
| 51 | +- **Runner Version** (`RUNNER_VERSION`): The version of the GitHub Actions |
| 52 | + runner software itself, from |
| 53 | + [actions/runner](https://github.com/actions/runner/releases) |
| 54 | +- **Runner Container Hooks Version** (`RUNNER_CONTAINER_HOOKS_VERSION`): The |
| 55 | + version of container hooks for Kubernetes integration, from |
| 56 | + [actions/runner-container-hooks](https://github.com/actions/runner-container-hooks/releases) |
| 57 | + |
| 58 | +Both versions are stored in the `.env` file and automatically updated by the |
| 59 | +version update workflow. |
| 60 | + |
| 61 | +### Usage Examples |
34 | 62 |
|
35 | | -The `.env` file stores the pinned versions, for example: |
| 63 | +Pull the latest image: |
36 | 64 |
|
| 65 | +```bash |
| 66 | +docker pull ghcr.io/usatlas/actions-runner:latest |
37 | 67 | ``` |
38 | | -RUNNER_VERSION=2.329.0 |
39 | | -RUNNER_CONTAINER_HOOKS_VERSION=0.7.0 |
| 68 | + |
| 69 | +Pull a specific pinned version: |
| 70 | + |
| 71 | +```bash |
| 72 | +docker pull ghcr.io/usatlas/actions-runner:2.329.0-0.8.0 |
40 | 73 | ``` |
41 | 74 |
|
42 | | -These values are automatically updated by the workflow. |
| 75 | +### Multi-Platform Support |
| 76 | + |
| 77 | +Images are built for both `linux/amd64` and `linux/arm64` architectures. |
| 78 | + |
| 79 | +## 🚀 Automated Version Updates |
| 80 | + |
| 81 | +The regularly-scheduled GitHub Actions workflow, powered by `gh` CLI for |
| 82 | +interacting with GitHub's API, runs the following steps: |
| 83 | + |
| 84 | +1. **Fetch latest runner releases** from the official GitHub runners repository. |
| 85 | +2. **Compare versions** against what is currently stored in `.env`. |
| 86 | +3. If any versions have changed: |
| 87 | + - A new branch named `update-runner-versions` is created. |
| 88 | + - `.env` is updated with the new versions. |
| 89 | + - A commit is created with a message summarizing exactly what changed. |
| 90 | + - A pull request is automatically opened. |
| 91 | + |
| 92 | +### 📝 Example Commit Message |
| 93 | + |
| 94 | +When versions change, the commit message looks like: |
| 95 | + |
| 96 | +``` |
| 97 | +Update GitHub Actions runner versions |
43 | 98 |
|
44 | | -## 🤖 Automation Workflow |
| 99 | +- Container Hooks: [0.7.0](https://github.com/actions/runner-container-hooks/releases/tag/v0.7.0) → [0.8.0](https://github.com/actions/runner-container-hooks/releases/tag/v0.8.0) |
| 100 | +``` |
45 | 101 |
|
46 | | -The regularly-scheduled update job is powered by `gh` CLI (preinstalled on runners) for interacting with GitHub. |
| 102 | +Commit messages only include entries for components that actually changed. |
0 commit comments