-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.25 KB
/
cluster_scanner.yaml
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
name: Cluster Scanner
on:
# For test purposes. Trigger it on pushes to the cluster-scanner branch.
push:
branches:
- cluster-scanner
# It runs every Friday, 9:30 UTC. The schedule job only works if the workflow is available in the main branch.
#schedule:
# - cron: "30 9 * * 5"
workflow_dispatch:
env:
PALETTE_API_KEY: ${{ secrets.SPECTROCLOUD_API_KEY }}
PALETTE_HOST: ${{ secrets.SPECTROCLOUD_HOST }}
PALETTE_PROJECT_UID: ${{ secrets.PALETTE_PROJECT_UID }}
jobs:
scan-clusters:
name: cluster-scan
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set Up Go
uses: actions/setup-go@v5
with:
go-version-file: "scripts/cluster-scanner/go.mod"
- name: Install dependencies
run: |
cd scripts/cluster-scanner/
go get ./...
- name: Execute tests
run: |
cd scripts/cluster-scanner/
go test ./...
- name: Execute the cluster scanner application
run: |
cd scripts/cluster-scanner/
go run .
# Get the output
# Ignore Slack output if there are no clusters running
# Send slack notification if output is different than what was planned