Skip to content

Commit

Permalink
use go-version-file and 1.22 in workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Rudraksh Pareek <[email protected]>
  • Loading branch information
DelusionalOptimist committed Mar 7, 2024
1 parent bf840c3 commit 51defd6
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 45 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci-latest-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ jobs:
with:
submodules: true

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "v1.22.1"
go-version-file: 'KubeArmor/go.mod'

- name: Install the latest LLVM toolchain
run: ./.github/workflows/install-llvm.sh
Expand Down Expand Up @@ -217,11 +217,11 @@ jobs:
runs-on: ubuntu-latest-16-cores
timeout-minutes: 60
steps:
- uses: actions/setup-go@v3
with:
go-version: "v1.22.1"

- uses: actions/checkout@v3

- uses: actions/setup-go@v5
with:
go-version-file: 'KubeArmor/go.mod'

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci-operator-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ jobs:
id-token: write
timeout-minutes: 90
steps:
- uses: actions/setup-go@v3
with:
go-version: "v1.22.1"

- uses: actions/checkout@v3

- uses: actions/setup-go@v5
with:
go-version-file: 'KubeArmor/go.mod'

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-systemd-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
with:
submodules: true

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "v1.22.1"
go-version-file: 'KubeArmor/go.mod'

- name: Install the latest LLVM toolchain
run: ./.github/workflows/install-llvm.sh
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci-test-controllers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ jobs:
env:
RUNTIME: "containerd"
steps:
- uses: actions/setup-go@v3
with:
go-version: "v1.22.1"

- uses: actions/checkout@v3
with:
submodules: true

- uses: actions/setup-go@v5
with:
go-version-file: 'KubeArmor/go.mod'

- name: Check what paths were updated
uses: dorny/paths-filter@v2
id: filter
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-test-ginkgo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ jobs:
with:
submodules: true

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "v1.22.1"
go-version-file: 'KubeArmor/go.mod'

- name: Install the latest LLVM toolchain
run: ./.github/workflows/install-llvm.sh
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/ci-test-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "v1.22.1"
go-version-file: 'KubeArmor/go.mod'

- name: Check gofmt
run: make gofmt
Expand All @@ -40,9 +40,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "v1.22.1"
go-version-file: 'KubeArmor/go.mod'

- name: Run Revive Action on KubeArmor
uses: morphy2k/revive-action@v2
Expand All @@ -54,9 +54,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "v1.22.1"
go-version-file: 'KubeArmor/go.mod'

- name: Run Revive Action on KubeArmor tests
uses: morphy2k/revive-action@v2
Expand All @@ -68,9 +68,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "v1.22.1"
go-version-file: 'KubeArmor/go.mod'

- name: Run Gosec Security Scanner
run: make gosec
Expand All @@ -81,9 +81,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "v1.22.1"
go-version-file: 'KubeArmor/go.mod'

- name: Run govulncheck
run: make scan
Expand All @@ -94,9 +94,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "v1.22.1"
go-version-file: 'KubeArmor/go.mod'

- name: Run go test on the KubeArmor/KubeArmor directory
run: go test ./...
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-test-helm-charts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
with:
submodules: true

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "v1.22.1"
go-version-file: 'KubeArmor/go.mod'

- uses: azure/setup-helm@v3
with:
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/ci-test-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ jobs:
runs-on: ubuntu-20.04
timeout-minutes: 20
steps:
- uses: actions/setup-go@v3
with:
go-version: v1.22.1

- uses: actions/checkout@v3

- uses: actions/setup-go@v5
with:
# working-directory only takes effect for "run"
go-version-file: 'KubeArmor/go.mod'

- name: Build kubearmor operator
run: make docker-build TAG=latest
4 changes: 2 additions & 2 deletions .github/workflows/ci-test-systemd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
with:
submodules: true

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "v1.22.1"
go-version-file: 'KubeArmor/go.mod'

- name: Install the latest LLVM toolchain
run: ./.github/workflows/install-llvm.sh
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-test-ubi-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
with:
submodules: true

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "v1.22.1"
go-version-file: 'KubeArmor/go.mod'

- name: Install the latest LLVM toolchain
run: ./.github/workflows/install-llvm.sh
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

### Builder

FROM golang:1.22.1-alpine3.19 as builder
FROM golang:1.22-alpine3.19 as builder

RUN apk --no-cache update
RUN apk add --no-cache git clang llvm make gcc protobuf
Expand Down
4 changes: 2 additions & 2 deletions pkg/KubeArmorController/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright 2022 Authors of KubeArmor

# Build the manager binary
FROM golang:1.22.1 as builder
FROM golang:1.22 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand Down Expand Up @@ -44,4 +44,4 @@ COPY --from=builder --chown=default:default /workspace/manager .
COPY LICENSE /licenses/license.txt

USER 1000
ENTRYPOINT ["/manager"]
ENTRYPOINT ["/manager"]
4 changes: 2 additions & 2 deletions pkg/KubeArmorOperator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2022 Authors of KubeArmor

FROM docker.io/golang:1.22.1 as builder
FROM docker.io/golang:1.22 as builder
ARG GOARCH
ARG GOOS

Expand Down Expand Up @@ -79,4 +79,4 @@ ARG OPERATOR_DIR=pkg/KubeArmorOperator
COPY --from=builder /KubeArmor/$OPERATOR_DIR/snitch /snitch
COPY LICENSE /licenses/license.txt

ENTRYPOINT ["/snitch"]
ENTRYPOINT ["/snitch"]

0 comments on commit 51defd6

Please sign in to comment.