Skip to content

Commit 67ae63f

Browse files
committed
Cleanup workflows and pin action versions
Signed-off-by: Philip Laine <philip.laine@gmail.com>
1 parent 60ce12c commit 67ae63f

6 files changed

Lines changed: 39 additions & 140 deletions

File tree

Original file line numberDiff line numberDiff line change
@@ -1,35 +1,24 @@
1-
name: E2E Tests
2-
1+
name: e2e
32
on:
4-
push:
53
pull_request:
6-
74
jobs:
8-
test-e2e:
9-
name: Run on Ubuntu
5+
kind:
106
runs-on: ubuntu-latest
117
steps:
128
- name: Clone the code
13-
uses: actions/checkout@v4
14-
9+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
1510
- name: Setup Go
16-
uses: actions/setup-go@v5
11+
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 #v6.3.0
1712
with:
1813
go-version-file: go.mod
19-
2014
- name: Install the latest version of kind
2115
run: |
2216
curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64
2317
chmod +x ./kind
2418
sudo mv ./kind /usr/local/bin/kind
25-
2619
- name: Verify kind installation
2720
run: kind version
28-
2921
- name: Create kind cluster
3022
run: kind create cluster
31-
32-
- name: Running Test e2e
33-
run: |
34-
go mod tidy
35-
make test-e2e
23+
- name: Running e2e test
24+
run: make test-e2e
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,49 @@
1-
name: Test Chart
2-
1+
name: helm
32
on:
4-
push:
53
pull_request:
6-
74
jobs:
8-
test-e2e:
9-
name: Run on Ubuntu
5+
lint:
106
runs-on: ubuntu-latest
117
steps:
128
- name: Clone the code
13-
uses: actions/checkout@v4
14-
9+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
10+
- name: Lint Helm Chart
11+
run: helm lint ./helm/kubernetes-operator
12+
test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Clone the code
16+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
1517
- name: Setup Go
16-
uses: actions/setup-go@v5
18+
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 #v6.3.0
1719
with:
1820
go-version-file: go.mod
19-
2021
- name: Install the latest version of kind
2122
run: |
2223
curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64
2324
chmod +x ./kind
2425
sudo mv ./kind /usr/local/bin/kind
25-
2626
- name: Verify kind installation
2727
run: kind version
28-
2928
- name: Create kind cluster
3029
run: kind create cluster
31-
3230
- name: Prepare operator
3331
run: |
34-
go mod tidy
3532
make docker-build IMG=netbirdio/kubernetes-operator:debug
3633
kind load docker-image netbirdio/kubernetes-operator:debug
37-
38-
- name: Install Helm
39-
run: |
40-
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
41-
42-
- name: Verify Helm installation
43-
run: helm version
44-
45-
- name: Lint Helm Chart
46-
run: |
47-
helm lint ./helm/kubernetes-operator
48-
4934
- name: Install cert-manager via Helm
5035
run: |
5136
helm repo add jetstack https://charts.jetstack.io
5237
helm repo update
5338
helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --set installCRDs=true
54-
5539
- name: Wait for cert-manager to be ready
5640
run: |
5741
kubectl wait --namespace cert-manager --for=condition=available --timeout=300s deployment/cert-manager
5842
kubectl wait --namespace cert-manager --for=condition=available --timeout=300s deployment/cert-manager-cainjector
5943
kubectl wait --namespace cert-manager --for=condition=available --timeout=300s deployment/cert-manager-webhook
60-
6144
- name: Install Helm chart for project
6245
run: |
6346
helm install test-chart --create-namespace --namespace netbird --set 'operator.image.tag=debug' ./helm/kubernetes-operator
64-
6547
- name: Check Helm release status
6648
run: |
6749
helm status test-chart --namespace netbird
68-

.github/workflows/helm.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.
Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,39 @@
1-
name: Docker
2-
1+
name: release
32
on:
43
push:
54
tags:
65
- "v*"
76
branches:
87
- main
9-
pull_request:
10-
118
jobs:
12-
release:
9+
docker:
1310
runs-on: ubuntu-latest
1411
permissions:
1512
contents: read
1613
packages: write
17-
# This is used to complete the identity challenge
18-
# with sigstore/fulcio when running outside of PRs.
1914
id-token: write
20-
2115
steps:
2216
- name: Docker meta
2317
id: meta
24-
uses: docker/metadata-action@v5
18+
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf #v6.0.0
2519
with:
26-
# list of Docker images to use as base name for tags
2720
images: |
2821
netbirdio/kubernetes-operator
29-
# generate Docker tags based on the following events/attributes
3022
tags: |
3123
type=ref,event=pr
3224
type=ref,event=branch
3325
type=semver,pattern={{version}}
34-
3526
- name: Login to Docker Hub
36-
if: github.repository == github.event.pull_request.head.repo.full_name || !github.head_ref
37-
uses: docker/login-action@v3
27+
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 #v4.0.0
3828
with:
3929
username: ${{ secrets.DOCKER_USER }}
4030
password: ${{ secrets.DOCKER_TOKEN }}
41-
4231
- name: Set up QEMU
43-
uses: docker/setup-qemu-action@v3
44-
32+
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a #v4.0.0
4533
- name: Set up Docker Buildx
46-
uses: docker/setup-buildx-action@v3
47-
34+
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd #v4.0.0
4835
- name: Build and push
49-
uses: docker/build-push-action@v6
36+
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 #v7.0.0
5037
with:
5138
platforms: linux/amd64,linux/arm64
5239
push: true
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,29 @@
1-
name: Lint
2-
1+
name: test
32
on:
4-
push:
53
pull_request:
6-
4+
push:
5+
branches:
6+
- 'main'
77
jobs:
88
lint:
9-
name: Run on Ubuntu
109
runs-on: ubuntu-latest
1110
steps:
1211
- name: Clone the code
1312
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
14-
1513
- name: Setup Go
1614
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 #v6.3.0
1715
with:
1816
go-version-file: go.mod
19-
2017
- name: Run linter
2118
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 #v9.2.0
19+
unit:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Clone the code
23+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
24+
- name: Setup Go
25+
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 #v6.3.0
26+
with:
27+
go-version-file: go.mod
28+
- name: Running Tests
29+
run: make test

.github/workflows/test.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)