Skip to content

Commit 8d65fd4

Browse files
committed
Correct and update workflows so we can enable Actions
The existing workflows are out of date and insecure. This change updates the relevant workflows to the current state of the repository, corrects some issues, and disables workflows that will be handled through other means.
1 parent d8a5cc1 commit 8d65fd4

13 files changed

+132
-133
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@ jobs:
3838

3939
steps:
4040
- name: Set up Go 1.x
41-
uses: actions/setup-go@v2
41+
uses: actions/setup-go@v5
4242
with:
43-
go-version: ^1.19
43+
go-version: '1.23'
4444
id: go
4545

4646
- name: Checkout repository
47-
uses: actions/checkout@v3
47+
uses: actions/checkout@v4
4848

4949
# Initializes the CodeQL tools for scanning.
5050
- name: Initialize CodeQL
51-
uses: github/codeql-action/init@v1
51+
uses: github/codeql-action/init@v3
5252
with:
5353
languages: ${{ matrix.language }}
5454
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -63,4 +63,4 @@ jobs:
6363
make all
6464
6565
- name: Perform CodeQL Analysis
66-
uses: github/codeql-action/analyze@v1
66+
uses: github/codeql-action/analyze@v3

.github/workflows/codespell.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ jobs:
88
name: Check for spelling errors
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v4
1212
- uses: codespell-project/actions-codespell@master
1313
with:
1414
check_filenames: true
1515
skip: ./.git,./.github/workflows/codespell.yml,.git,*.png,*.jpg,*.svg,*.sum,./vendor,go.sum
16-
ignore_words_list: "AKS,aks,ro"
16+
ignore_words_list: "AKS,aks,ro,NotIn"

.github/workflows/darwin.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
name: MacOS Build & Unit Test
22

33
# Controls when the workflow will run
4-
on:
4+
#on:
55
# Triggers the workflow on push or pull request events but only for the main branch
6-
push:
7-
branches: [ main ]
8-
pull_request:
9-
branches: [ main ]
6+
#push:
7+
#branches: [ main ]
8+
#pull_request:
9+
#branches: [ main ]
1010
# Allows you to run this workflow manually from the Actions tab
11-
workflow_dispatch:
11+
#workflow_dispatch:
1212

1313
jobs:
1414
build:
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set up Go 1.x
1919
uses: actions/setup-go@v2
2020
with:
21-
go-version: ^1.19
21+
go-version: '1.23'
2222
id: go
2323
- name: Check out code into the Go module directory
2424
uses: actions/checkout@v2

.github/workflows/external_e2e.yaml

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
---
2-
name: External E2E Test
1+
#---
2+
#name: External E2E Test
33

4-
on:
5-
workflow_dispatch:
4+
#on:
5+
#workflow_dispatch:
66

7-
jobs:
8-
Run-external-e2e-test:
9-
name: Run External E2E Test
10-
runs-on: ubuntu-latest
11-
container: ubuntu:18.04
12-
steps:
13-
- name: Set up Go 1.x
14-
uses: actions/setup-go@v2
15-
with:
16-
go-version: ^1.19
17-
id: go
18-
- name: Check out code into the Go module directory
19-
uses: actions/checkout@v2
20-
- name: Install CA and curl
21-
run: |
22-
apt update -y
23-
apt install -y --no-install-recommends curl ca-certificates
24-
update-ca-certificates
25-
- name: Install ginkgo
26-
run: go install github.com/onsi/ginkgo/v2/ginkgo@latest
27-
- name: Set up kubectl
28-
run: |
29-
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/\
30-
release/stable.txt)/bin/linux/amd64/kubectl" -o kubectl
31-
chmod +x kubectl
32-
cp ./kubectl /usr/bin/
33-
mkdir ~/.kube
34-
echo ${{ secrets.KUBE_CONFIG }} | base64 > ~/.kube/config
35-
- name: Run External E2E Test
36-
run: test/external-e2e/run.sh
7+
#jobs:
8+
#Run-external-e2e-test:
9+
#name: Run External E2E Test
10+
#runs-on: ubuntu-latest
11+
#container: ubuntu:18.04
12+
#steps:
13+
#- name: Set up Go 1.x
14+
##uses: actions/setup-go@v2
15+
#with:
16+
#go-version: '1.23'
17+
#id: go
18+
#- name: Check out code into the Go module directory
19+
#uses: actions/checkout@v2
20+
#- name: Install CA and curl
21+
#run: |
22+
#apt update -y
23+
#apt install -y --no-install-recommends curl ca-certificates
24+
#update-ca-certificates
25+
#- name: Install ginkgo
26+
#run: go install github.com/onsi/ginkgo/v2/ginkgo@latest
27+
#- name: Set up kubectl
28+
#run: |
29+
#curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/\
30+
#release/stable.txt)/bin/linux/amd64/kubectl" -o kubectl
31+
#chmod +x kubectl
32+
#cp ./kubectl /usr/bin/
33+
#mkdir ~/.kube
34+
#echo ${{ secrets.KUBE_CONFIG }} | base64 > ~/.kube/config
35+
#- name: Run External E2E Test
36+
#run: test/external-e2e/run.sh
Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
1-
---
2-
name: Integration Test on AKS
1+
#---
2+
#name: Integration Test on AKS
33

4-
on:
4+
#on:
55
# Triggers the workflow on push or pull request events but only for the main branch
6-
push:
7-
branches: [main]
8-
pull_request_target:
9-
branches: [main]
10-
types: [labeled]
6+
#push:
7+
#branches: [main]
8+
#pull_request:
9+
#branches: [main]
10+
#types: [labeled]
1111
# Allows you to run this workflow manually from the Actions tab
12-
workflow_dispatch:
12+
#workflow_dispatch:
1313

14-
jobs:
15-
Run-Integration-Test-on-AKS:
16-
if: contains(github.event.pull_request.labels.*.name, 'safe to test')
17-
name: Run Integration Test on AKS
18-
runs-on: ubuntu-latest
19-
steps:
20-
- name: Set up Go 1.x
21-
uses: actions/setup-go@v2
22-
with:
23-
go-version: ^1.19
24-
id: go
25-
- name: Check out code
26-
uses: actions/checkout@v2
27-
with:
28-
ref: ${{ github.event.pull_request.head.sha }}
29-
- name: Build Code
30-
run: |
31-
make azurelustre
32-
cp ./_output/azurelustreplugin ./test/integration_aks/image/
33-
- name: Docker login
34-
uses: docker/login-action@v1
35-
with:
36-
registry: ${{ secrets.TEST_ACR_URI }}
37-
username: ${{ secrets.TEST_ACR_USERNAME }}
38-
password: ${{ secrets.TEST_ACR_PASSWORD }}
39-
- name: Build and push integration test container
40-
uses: docker/build-push-action@v2
41-
with:
42-
context: ./test/integration_aks/image
43-
push: true
44-
tags: ${{ secrets.TEST_ACR_URI }}/azurelustre-csi-integration-test:latest
45-
- name: Run integration test
46-
run: |
47-
./hack/verify-integration-test-aks.sh
48-
env:
49-
kube_config: ${{ secrets.KUBE_CONFIG }}
50-
test_acr_uri: ${{ secrets.TEST_ACR_URI }}
51-
lustre_fs_name: ${{ secrets.LUSTRE_FS_NAME }}
52-
lustre_fs_ip: ${{ secrets.LUSTRE_FS_IP }}
14+
#jobs:
15+
#Run-Integration-Test-on-AKS:
16+
#if: contains(github.event.pull_request.labels.*.name, 'safe to test')
17+
#name: Run Integration Test on AKS
18+
#runs-on: ubuntu-latest
19+
#steps:
20+
#- name: Set up Go 1.x
21+
#uses: actions/setup-go@v2
22+
#with:
23+
#go-version: '1.23'
24+
#id: go
25+
#- name: Check out code
26+
#uses: actions/checkout@v2
27+
#with:
28+
#ref: ${{ github.event.pull_request.head.sha }}
29+
#- name: Build Code
30+
#run: |
31+
#make azurelustre
32+
#cp ./_output/azurelustreplugin ./test/integration_aks/image/
33+
#- name: Docker login
34+
#uses: docker/login-action@v1
35+
#with:
36+
#registry: ${{ secrets.TEST_ACR_URI }}
37+
#username: ${{ secrets.TEST_ACR_USERNAME }}
38+
#password: ${{ secrets.TEST_ACR_PASSWORD }}
39+
#- name: Build and push integration test container
40+
#uses: docker/build-push-action@v2
41+
#with:
42+
#context: ./test/integration_aks/image
43+
#push: true
44+
#tags: ${{ secrets.TEST_ACR_URI }}/azurelustre-csi-integration-test:latest
45+
#- name: Run integration test
46+
#run: |
47+
#./hack/verify-integration-test-aks.sh
48+
#env:
49+
#kube_config: ${{ secrets.KUBE_CONFIG }}
50+
#test_acr_uri: ${{ secrets.TEST_ACR_URI }}
51+
#lustre_fs_name: ${{ secrets.LUSTRE_FS_NAME }}
52+
#lustre_fs_ip: ${{ secrets.LUSTRE_FS_IP }}

.github/workflows/linux.yaml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@ name: Linux Tests
22

33
# Controls when the workflow will run
44
on:
5-
# Triggers the workflow on push or pull request events but only for the main branch
6-
push:
7-
branches: [ main ]
8-
pull_request:
9-
branches: [ main ]
5+
pull_request: {}
6+
push: {}
107
# Allows you to run this workflow manually from the Actions tab
118
workflow_dispatch:
129

@@ -16,16 +13,17 @@ jobs:
1613
runs-on: ubuntu-latest
1714
steps:
1815
- name: Set up Go 1.x
19-
uses: actions/setup-go@v3
16+
uses: actions/setup-go@v5
2017
with:
21-
go-version: ^1.19
18+
go-version: '1.23'
2219
id: go
2320

2421
- name: Check out code into the Go module directory
25-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
2623

2724
- name: Run unit test
2825
run: |
26+
2927
export PATH=$PATH:$HOME/.local/bin
3028
sudo apt-get update
3129
make verify
@@ -42,7 +40,7 @@ jobs:
4240
4341
- name: Get code coverage
4442
env:
45-
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4644
run: |
4745
GO111MODULE=off go get github.com/mattn/goveralls
4846
$(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github

.github/workflows/sanity_test_local.yaml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@ name: Sanity Test Local
22

33
# Controls when the workflow will run
44
on:
5-
# Triggers the workflow on push or pull request events but only for the main branch
6-
push:
7-
branches: [ main ]
8-
pull_request:
9-
branches: [ main ]
5+
push: {}
6+
pull_request: {}
107
# Allows you to run this workflow manually from the Actions tab
118
workflow_dispatch:
129

@@ -16,11 +13,11 @@ jobs:
1613
runs-on: ubuntu-latest
1714
steps:
1815
- name: Set up Go 1.x
19-
uses: actions/setup-go@v2
16+
uses: actions/setup-go@v5
2017
with:
21-
go-version: ^1.19
18+
go-version: '1.23'
2219
id: go
2320
- name: Check out code into the Go module directory
24-
uses: actions/checkout@v2
21+
uses: actions/checkout@v3
2522
- name: Run Sanity Test
2623
run: make sanity-test-local

.github/workflows/static.yaml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,23 @@ name: Static Checks
22

33
# Controls when the workflow will run
44
on:
5-
# Triggers the workflow on push or pull request events but only for the main branch
6-
push:
7-
branches: [ main ]
8-
pull_request:
9-
branches: [ main ]
5+
pull_request: {}
6+
push: {}
107
# Allows you to run this workflow manually from the Actions tab
118
workflow_dispatch:
129

1310
jobs:
1411
go_lint:
1512
name: Go Lint
16-
runs-on: ubuntu-18.04
13+
runs-on: ubuntu-latest
1714
steps:
18-
- uses: actions/setup-go@v3
15+
- uses: actions/setup-go@v5
1916
with:
20-
go-version: 1.19
17+
go-version: '1.23'
2118
- name: Checkout code
2219
uses: actions/checkout@master
2320
- name: Run linter
24-
uses: golangci/golangci-lint-action@v3
21+
uses: golangci/golangci-lint-action@v6
2522
with:
2623
working-directory: pkg
2724
args: -E=gofmt --timeout=30m0s

.github/workflows/trivy.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ on:
1313
jobs:
1414
build:
1515
name: Build
16-
runs-on: ubuntu-20.04
16+
runs-on: ubuntu-latest
1717
steps:
1818
- uses: actions/setup-go@v3
1919
with:
20-
go-version: 1.19
20+
go-version: '1.23'
2121

2222
- name: Checkout code
23-
uses: actions/checkout@v2
23+
uses: actions/checkout@v4
2424

2525
- name: Build an image from Dockerfile
2626
run: |

.github/workflows/windows.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
name: Windows Tests
22

33
# Controls when the workflow will run
4-
on:
4+
#on:
55
# Triggers the workflow on push or pull request events but only for the main branch
6-
push:
7-
branches: [ main ]
8-
pull_request:
9-
branches: [ main ]
6+
#push:
7+
#branches: [ main ]
8+
#pull_request:
9+
#branches: [ main ]
1010
# Allows you to run this workflow manually from the Actions tab
11-
workflow_dispatch:
11+
#workflow_dispatch:
1212

1313
jobs:
1414
build:

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module sigs.k8s.io/azurelustre-csi-driver
22

3-
go 1.19
3+
go 1.23
44

55
require (
66
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.1.1

0 commit comments

Comments
 (0)