Skip to content

Commit

Permalink
PR: Update github actions to node20
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzadlone committed Jun 25, 2024
1 parent 5855969 commit 3f8376d
Show file tree
Hide file tree
Showing 15 changed files with 74 additions and 64 deletions.
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'
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
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
13 changes: 7 additions & 6 deletions .github/workflows/lint-then-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,15 @@ 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
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
9 changes: 5 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,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: Run golangci-lint linter
uses: golangci/golangci-lint-action@v3
Expand Down Expand Up @@ -75,7 +76,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
13 changes: 7 additions & 6 deletions .github/workflows/test-and-upload-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,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: Set cache paths
id: cache-paths
Expand Down Expand Up @@ -164,7 +165,7 @@ jobs:

- name: Upload coverage artifact
if: ${{ !matrix.detect-changes }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}_${{ matrix.client-type }}_${{ matrix.database-type }}_${{ matrix.mutation-type }}
path: coverage.txt
Expand All @@ -185,10 +186,10 @@ jobs:

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

- name: Download coverage reports
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: coverage_reports

Expand Down
Loading

0 comments on commit 3f8376d

Please sign in to comment.