Skip to content

Commit 3726e07

Browse files
authored
start adding some CI (missed in initial copy) (#3)
1 parent 8c771de commit 3726e07

File tree

3 files changed

+93
-0
lines changed

3 files changed

+93
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: User Clouds Go Setup
2+
description: 'Sets up the golang environment for User Clouds CI runs'
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Setup golang
7+
uses: actions/setup-go@v5
8+
with:
9+
go-version-file: go.mod
10+
- name: Log go version
11+
shell: bash
12+
run: go version
13+
- name: Update PATH
14+
shell: bash
15+
run: |
16+
echo "$(pwd)/bin" >> $GITHUB_PATH
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: User Clouds NodeJS Setup
2+
description: 'Sets up the NodeJS environment for User Clouds CI runs'
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Enable Yarn
7+
shell: bash
8+
run: corepack enable
9+
- name: Use Node.js
10+
uses: actions/setup-node@v4
11+
with:
12+
node-version-file: './.node-version'
13+
cache: 'yarn'
14+
cache-dependency-path: '**/yarn.lock'
15+
- name: Log Node version
16+
shell: bash
17+
run: node --version
18+
- name: Install dependencies
19+
shell: bash
20+
run: |
21+
yarn --version
22+
make ui-yarn-build-only-ci

.github/workflows/helm-charts.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: helm-charts
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request: {}
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
9+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
10+
jobs:
11+
verify:
12+
runs-on: ubuntu-24.04
13+
timeout-minutes: 5
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Get changed files
17+
id: changed-files
18+
uses: tj-actions/changed-files@480f49412651059a414a6a5c96887abb1877de8a # v45.0.7
19+
with:
20+
files: |
21+
.github/workflows/helm-charts.yml
22+
tools/sync-to-public-repo.py
23+
public-repos/helm-charts/**
24+
helm/**
25+
- name: List modified files
26+
if: steps.changed-files.outputs.any_changed == 'true'
27+
run: |
28+
echo "One or more files have changed: ${{ steps.changed-files.outputs.all_changed_files }}"
29+
- name: KubeConform manifests cache
30+
if: steps.changed-files.outputs.any_changed == 'true'
31+
uses: actions/cache@v4
32+
with:
33+
path: ~/.cache/kubeconform
34+
key: ${{ runner.os }}-kubeconform-v0
35+
- name: Check yq version
36+
if: steps.changed-files.outputs.any_changed == 'true'
37+
# yq is included in GHA, so just log the version
38+
run: yq --version
39+
- name: Install KubeConform
40+
if: steps.changed-files.outputs.any_changed == 'true'
41+
# https://github.com/yannh/kubeconform/releases/tag/v0.6.7
42+
run: |
43+
VERSION="0.6.7"
44+
FILENAME="kubeconform-linux-amd64.tar.gz"
45+
URL="https://github.com/yannh/kubeconform/releases/download/v${VERSION}/${FILENAME}"
46+
curl -L -o "${FILENAME}" "${URL}"
47+
tar xzf "${FILENAME}" && chmod +x kubeconform
48+
sudo mv kubeconform /usr/local/bin/
49+
kubeconform -v
50+
- name: Verify Helm Charts
51+
if: steps.changed-files.outputs.any_changed == 'true'
52+
run: |
53+
./helm/test-charts.sh
54+
outputs:
55+
files_changed: ${{ steps.changed-files.outputs.any_changed }}

0 commit comments

Comments
 (0)