-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add first draft of GH actions pipeline
- Loading branch information
1 parent
e3e0598
commit ba236bb
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
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: "palette-samples/scripts/cluster-scanner/go.mod" | ||
|
||
- name: Install dependencies | ||
run: | | ||
cd scripts/cluster-scanner/ | ||
go get ./... | ||
- name: Execute tests | ||
run: go test ./... | ||
|
||
- name: Execute the cluster scanner application | ||
run: 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 |