Skip to content

Update actions for go 1.21 #2618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/actions/govulncheck/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ inputs:
runs:
using: "composite"
steps:
- if: inputs.repo-checkout != 'false' # only explicit false prevents repo checkout
uses: actions/checkout@v3
- if: inputs.repo-checkout != false # only explicit false prevents repo checkout
uses: actions/checkout@v4
- uses: actions/[email protected]
with:
go-version: ${{ inputs.go-version-input }}
Expand All @@ -43,4 +43,4 @@ runs:
shell: bash
- name: Run govulncheck
run: govulncheck -C ${{ inputs.work-dir }} ${{ inputs.go-package }}
shell: bash
shell: bash
10 changes: 9 additions & 1 deletion .github/workflows/deps.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: "Dependency Review"
on: [push, pull_request, workflow_dispatch]
on:
pull_request:
branches:
- "master"
- "release*"
permissions:
contents: read
jobs:
Expand All @@ -24,8 +28,12 @@ jobs:
with:
go-version-input: 1.21.3
go-version-file: go.mod
cache: false
repo-checkout: false
- id: govulncheck-tests-agent
uses: ./.github/actions/govulncheck
with:
go-version-input: 1.21.3
go-version-file: test/agent/go.mod
cache: false
repo-checkout: false
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
go-version: "1.21"
Copy link
Contributor

@jaydeokar jaydeokar Oct 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use this so we don't have to update it everytime

go-version-file: <go.mod file> 

https://github.com/aws/aws-network-policy-agent/blob/main/.github/actions/install-dependencies/action.yaml#L8

- name: Set up tools
run: |
# Install ginkgo version from go.mod
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-cron-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
go-version: "1.21"
- name: Set up tools
run: |
# Install ginkgo version from go.mod
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/pr-automated-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
name: Automatic Pull Request test

on:
pull_request:
branches:
- "master"
- "release*"

permissions:
contents: read

jobs:
unit-test:
name: Unit test
Expand All @@ -19,17 +16,21 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
go-version: "1.21"
- name: Set up tools
run: |
go install golang.org/x/lint/golint@latest
go install golang.org/x/tools/cmd/goimports@latest
# Install ginkgo version from go.mod
go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo
- name: Run code checks
run: |
make check-format
make vet
- name: Build
run: make build-linux
- name: Build tests
run: make build-test-binaries
- name: Helm lint
run: make helm-lint
- name: Unit test
Expand All @@ -49,7 +50,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
go-version: "1.21"
- name: Build CNI images
run: make multi-arch-cni-build
- name: Build CNI Init images
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-manual-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
go-version: "1.21"
- name: Set up tools
run: |
# Install ginkgo version from go.mod
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
go-version: "1.21"
- name: Generate CNI YAML
run: make generate-cni-yaml
- name: Create eks-charts PR
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/weekly-cron-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
go-version: "1.21"
- name: Set up tools
run: |
# Install ginkgo version from go.mod
Expand Down