-
Notifications
You must be signed in to change notification settings - Fork 11
66 lines (58 loc) · 2.56 KB
/
manual-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: 🐝 Manually deploy runners
on:
workflow_dispatch: # deploy on demand
inputs:
target_scale_set: # name our runner set
# In this repository, this corresponds to the helm chart name in `/deployments/helm-***.yml`.
# e.g., `ubi8` would target `/deployments/helm-ubi8.yml`
description: "Which scale set to deploy?"
type: string
required: true
environment_name: # this corresponds to the environments we set up for our `kubeconfig` files
description: "Which environment to deploy to?"
type: choice # drop-down menus are fantastic!
required: true
options: # change these to your own names or change :point_up: to a `string` for freeform entry.
- "bare-metal"
- "test"
- "production"
default: "test"
runner_namespace:
description: "Which namespace to deploy to?"
type: choice
required: true
options: # again, change this to your own namespaces
- "runners"
- "test-runners"
default: "test-runners"
jobs:
deploy:
runs-on: ubuntu-latest # use the GitHub hosted runners to deploy the self-hosted runners in GHEC
# If using GHES or GHAE, use another deployment, such as having CentOS redeploy Ubuntu and vice versa
environment: ${{ github.event.inputs.environment_name }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Write out the kubeconfig info
run: |
echo ${{ secrets.DEPLOY_ACCOUNT }} | base64 -d > /tmp/config
- name: Update deployment (using latest chart of actions-runner-controller-charts/auto-scaling-runner-set)
run: |
helm install ${{ github.event.inputs.target_scale_set }} \
--namespace "${{ github.event.inputs.runner_namespace }}" \
--set githubConfigSecret.github_app_id="${{ vars.ARC_APP_ID }}" \
--set githubConfigSecret.github_app_installation_id="${{ vars.ARC_INSTALL_ID }}" \
--set githubConfigSecret.github_app_private_key="${{ secrets.ARC_APP_PRIVATE_KEY }}" \
-f deployments/helm-${{ github.event.inputs.target_scale_set }}.yml \
oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set \
--version 0.8.2
env:
KUBECONFIG: /tmp/config
- name: Remove kubeconfig info
run: rm -f /tmp/config