-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (56 loc) · 2.07 KB
/
kube-do.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
name: kube-do
on:
push:
branches:
- main
paths:
- '.github/workflows/kube-do.yml'
- 'clusters/kube-do-template.yaml'
env:
CLUSTER_NAME: do-template
CLUSTER_CONFIG_PATH: clusters/kube-do-template.yaml
jobs:
# cluster provisioning and platform bootstrap
kube-do:
name: Provision and Bootstrap
runs-on: ubuntu-latest
# makes sure it doesn't finish the minutes quota if stalls
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Helm Lint
uses: hckops/actions/helm-lint-action@v0.11.3
- name: Provision
uses: hckops/actions/kube-do-action@v0.11.3
id: provision
with:
github-token: ${{ github.token }}
access-token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
config-path: ${{ env.CLUSTER_CONFIG_PATH }}
enabled: true
wait: true
# for development only: if "true" bootstrap skipping cluster creation
skip-create: false
- name: Output
run: |
echo "Status: ${{ steps.provision.outputs.status }}"
echo "KubeConfig: ${{ steps.provision.outputs.kubeconfig }}"
- name: Bootstrap
if: ${{ steps.provision.outputs.status == 'CREATE' }}
uses: hckops/actions/bootstrap-action@v0.11.3
with:
argocd-admin-password: ${{ secrets.ARGOCD_ADMIN_PASSWORD }}
argocd-git-ssh-key: ${{ secrets.ARGOCD_HCKBOT_SSH_KEY }}
kubeconfig: ${{ steps.provision.outputs.kubeconfig }}
chart-path: ./charts/argocd-config
config-path: ${{ env.CLUSTER_CONFIG_PATH }}
- name: Notification
# notify also if previous steps failed
if: ${{ always() }}
uses: hckops/actions/discord-action@v0.11.3
with:
action: create-message
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
# markdown format
message: "> Repository: **${{ github.repository }}**\\n> Cluster:\\t\\t**${{ env.CLUSTER_NAME }}**\\n> Status:\\t\\t **${{ steps.provision.outputs.status }}**"