Skip to content
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

ci(i): Bump all gh-action versions to support node20 #2780

Merged
merged 3 commits into from
Jun 27, 2024
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
7 changes: 4 additions & 3 deletions .github/workflows/build-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ jobs:
steps:

- name: Checkout code into the directory
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Go environment explicitly
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version-file: 'go.mod'
Copy link
Member Author

Choose a reason for hiding this comment

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

info: This is done so we now don't have to manually update the version every time we bump go version. This will detect it from the mod file automatically.

check-latest: true
cache: false

- name: Build all dependencies
run: make deps
6 changes: 3 additions & 3 deletions .github/workflows/build-then-deploy-ami.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

steps:
- name: Checkout code into the directory
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Environment version target
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> ${GITHUB_ENV}
Expand Down Expand Up @@ -89,10 +89,10 @@ jobs:

steps:
- name: Checkout code into the directory
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Terraform action setup
uses: hashicorp/setup-terraform@v2
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.3.7

Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/check-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ jobs:

steps:
- name: Checkout code into the directory
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Go environment explicitly
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version-file: 'go.mod'
check-latest: true
cache: false

- name: Try generating cli documentation
run: make docs:cli
Expand All @@ -58,13 +59,14 @@ jobs:

steps:
- name: Checkout code into the directory
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Go environment explicitly
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version-file: 'go.mod'
check-latest: true
cache: false

- name: Try generating http documentation
run: make docs:http
Expand All @@ -83,13 +85,14 @@ jobs:

steps:
- name: Checkout code into the directory
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Go environment explicitly
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version-file: 'go.mod'
check-latest: true
cache: false

- name: Try generating readme toc
run: make toc
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/check-mocks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ jobs:

steps:
- name: Checkout code into the directory
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Go environment explicitly
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version-file: 'go.mod'
check-latest: true
cache: false

- name: Try generating mocks
run: make mocks
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/check-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,14 @@ jobs:
steps:

- name: Checkout code into the directory
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Go environment explicitly
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version-file: 'go.mod'
check-latest: true
cache: false

# This checks mod tidy is not broken.
- name: Check mod tidy
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-vulnerabilities.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
go-version-input: "1.21"
go-package: ./...
check-latest: true
cache: true
cache: false
Copy link
Contributor

Choose a reason for hiding this comment

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

question: Why have you disabled the cache? (all workflows)

Copy link
Member Author

@shahzadlone shahzadlone Jun 25, 2024

Choose a reason for hiding this comment

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

We don't want the built in caching (which uses lock files) to mess up our caches that are stored based on non-lockfiles for the main testing actions. These are quick actions that I don't care much about (to use cache), the main one we care about shouldn't miss caches because some other action cached a lock-file based one.

Copy link
Member Author

Choose a reason for hiding this comment

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

Another note: The places I added cache: false to where it didn't exist is because since the upgrade to the new version the default was changed to cache: true.

2 changes: 1 addition & 1 deletion .github/workflows/combine-bot-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

- name: Create combined pr
id: create-combined-pr
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/lint-then-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,18 @@ jobs:

steps:
- name: Checkout code into the directory
uses: actions/checkout@v3
uses: actions/checkout@v4

# Setting up Go explicitly is required for v3.0.0+ of golangci/golangci-lint-action.
- name: Setup Go environment explicitly
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version-file: 'go.mod'
check-latest: true
cache: false

- name: Run the golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6

with:
# Required: the version of golangci-lint is required.
Expand Down Expand Up @@ -192,7 +193,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run the full bechmarking suite
if: needs.decide-benchmark-type.outputs.benchmark-type == 'FULL'
Expand All @@ -214,7 +215,7 @@ jobs:
if: |
github.event_name == 'push' &&
github.ref_name == 'develop'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: bench-artifact-${{ github.sha }}
path: bench-artifact-${{ github.sha }}.txt
Expand Down Expand Up @@ -245,7 +246,7 @@ jobs:
if: |
github.event_name == 'pull_request' &&
github.base_ref == 'develop'
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v6
with:
github_token: ${{ secrets.ONLY_DEFRADB_REPO_CI_PAT }}
workflow: lint-then-benchmark.yml
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ on:
push:

permissions:
# Allow read access to pull request (Required for the `only-new-issues` option.)
# Required for the `only-new-issues` option.
pull-requests: read
# Required for analysis.
contents: read
# Required to annotate code in the PR.
checks: write

jobs:
lint-go:
Expand All @@ -31,16 +34,18 @@ jobs:

steps:
- name: Checkout code into the directory
uses: actions/checkout@v3
uses: actions/checkout@v4

# Setting up Go explicitly is required for v3.0.0+ of golangci/golangci-lint-action.
- name: Setup Go environment explicitly
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version-file: 'go.mod'
check-latest: true
cache: false

- name: Run golangci-lint linter
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
# Required: the version of golangci-lint is required.
# Note: The version should not pick the patch version as the latest patch
Expand Down Expand Up @@ -75,7 +80,7 @@ jobs:

steps:
- name: Checkout code into the directory
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run yamllint linter
uses: ibiqlik/action-yamllint@v3
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/preview-ami-with-terraform-plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Stop and notify the use of unprivileged flow or missing tokens
if: env.AWS_ACCESS_KEY_ID == '' || env.AWS_SECRET_ACCESS_KEY == ''
# Note: Fail this step, as we don't want unprivileged access doing these changes.
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
let unprivileged_warning =
Expand All @@ -64,10 +64,10 @@ jobs:
core.setFailed(unprivileged_warning)

- name: Checkout code into the directory
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Terraform action setup
uses: hashicorp/setup-terraform@v2
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.3.7

Expand All @@ -93,7 +93,7 @@ jobs:
continue-on-error: true

- name: Comment results on pull request
uses: actions/github-script@v6
uses: actions/github-script@v7
env:
TERRAFORM_PLAN_OUTPUT: "Terraform Plan Output:\n${{ steps.terraform-plan.outputs.stdout }}\n"

Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ jobs:

steps:
- name: Checkout code into the directory
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Go environment explicitly
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version-file: 'go.mod'
check-latest: true
cache: true
cache: false

- name: Apply tag
run: git tag ${{ github.event.inputs.tag }}
Expand All @@ -50,18 +50,18 @@ jobs:

- name: Set up QEMU
if: matrix.os == 'ubuntu-latest'
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Log in to Docker Hub
if: matrix.os == 'ubuntu-latest'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Log in to the Container registry
if: matrix.os == 'ubuntu-latest'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down Expand Up @@ -109,22 +109,22 @@ jobs:
needs: prepare
steps:
- name: Checkout code into the directory
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Apply tag
run: git tag ${{ github.event.inputs.tag }}

- name: Setup Go environment explicitly
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version-file: 'go.mod'
check-latest: true
cache: true
cache: false

- name: Log in to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand Down Expand Up @@ -193,7 +193,7 @@ jobs:

steps:
- name: Log in to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/start-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ jobs:
steps:

- name: Checkout code into the directory
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Go environment explicitly
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version-file: 'go.mod'
check-latest: true
cache: false

- name: Build modules
run: make deps:modules
Expand Down
Loading
Loading