From 1104fb065dcf899be20d503bd62460c80fed1a4a Mon Sep 17 00:00:00 2001 From: Michael Dombrowski Date: Thu, 4 Apr 2024 12:51:25 -0400 Subject: [PATCH] ci: upgrade github actions --- .github/workflows/externalPR.yml | 20 ++++++++++---------- .github/workflows/maven.yml | 14 ++++++++------ .github/workflows/uat.yaml | 4 ++-- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.github/workflows/externalPR.yml b/.github/workflows/externalPR.yml index 9c5804fb..c268c922 100644 --- a/.github/workflows/externalPR.yml +++ b/.github/workflows/externalPR.yml @@ -12,14 +12,14 @@ jobs: if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }} name: Comment steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: 'Download artifact' - uses: actions/github-script@v3.1.0 + uses: actions/github-script@v7 with: script: | - var artifacts = await github.actions.listWorkflowRunArtifacts({ + var artifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, run_id: ${{github.event.workflow_run.id }}, @@ -27,7 +27,7 @@ jobs: var matchArtifact = artifacts.data.artifacts.filter((artifact) => { return artifact.name == "pr" })[0]; - var download = await github.actions.downloadArtifact({ + var download = await github.rest.actions.downloadArtifact({ owner: context.repo.owner, repo: context.repo.repo, artifact_id: matchArtifact.id, @@ -38,10 +38,10 @@ jobs: - run: unzip pr.zip - name: outputs run: |- - echo '::set-output name=PR::$(cat NR)' - echo '::set-output name=SHA::$(cat SHA)' + echo "PR=$(cat NR)" >> $GITHUB_ENV + echo "SHA=$(cat SHA)" >> $GITHUB_ENV - name: cobertura-report-unit-test - uses: 5monkeys/cobertura-action@master + uses: 5monkeys/cobertura-action@v14 continue-on-error: true with: # The GITHUB_TOKEN for this repo @@ -60,9 +60,9 @@ jobs: show_class_names: true # Use a unique name for the report and comment report_name: Unit Tests Coverage Report - pull_request_number: ${{ steps.outputs.outputs.PR }} + pull_request_number: ${{ env.PR }} - name: cobertura-report-integration-test - uses: 5monkeys/cobertura-action@master + uses: 5monkeys/cobertura-action@v14 continue-on-error: true with: # The GITHUB_TOKEN for this repo @@ -81,4 +81,4 @@ jobs: show_class_names: true # Use a unique name for the report and comment report_name: Integration Tests Coverage Report - pull_request_number: ${{ steps.outputs.outputs.PR }} + pull_request_number: ${{ env.PR }} diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index df3450c3..61339ea6 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -11,14 +11,16 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: wagoid/commitlint-github-action@v4 + - uses: wagoid/commitlint-github-action@v6 - name: Set up JDK 1.8 - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: - java-version: 1.8 + distribution: corretto + java-version: 8 + cache: maven - run: rm -rf /tmp/* continue-on-error: true - name: Build with Maven @@ -26,13 +28,13 @@ jobs: AWS_REGION: us-west-2 run: mvn -ntp -U clean verify - name: Upload Failed Test Report - uses: actions/upload-artifact@v1.0.0 + uses: actions/upload-artifact@v3 if: failure() with: name: Failed Test Report path: target/surefire-reports - name: Upload Coverage - uses: actions/upload-artifact@v1.0.0 + uses: actions/upload-artifact@v3 if: always() with: name: Coverage Report diff --git a/.github/workflows/uat.yaml b/.github/workflows/uat.yaml index 7c03341a..909ba80e 100644 --- a/.github/workflows/uat.yaml +++ b/.github/workflows/uat.yaml @@ -26,7 +26,7 @@ jobs: os: [ ubuntu-latest ] steps: - name: configure aws credentials - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} role-session-name: logManagerCI @@ -35,4 +35,4 @@ jobs: uses: aws-actions/aws-codebuild-run-build@v1 with: project-name: ${{ env.CODE_BUILD_PROJECT_LINUX }} - buildspec-override: uat/codebuild/uat_linux_buildspec.yaml \ No newline at end of file + buildspec-override: uat/codebuild/uat_linux_buildspec.yaml