From 6ee4fd646221a956135695ce77b89cac3f2d5d75 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Wed, 12 Oct 2022 12:10:04 -0600 Subject: [PATCH] per #1863, fix GitHub Actions warnings by updating versions of actions and changing set-output to use , ci-run-all-diff --- .github/jobs/get_use_cases_to_run.sh | 6 +++--- .github/jobs/run_difference_tests.sh | 4 ++-- .github/jobs/save_error_logs.sh | 4 ++-- .github/jobs/set_job_controls.sh | 12 ++++++------ .github/workflows/documentation.yml | 8 ++++---- .github/workflows/testing.yml | 20 ++++++++++---------- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/jobs/get_use_cases_to_run.sh b/.github/jobs/get_use_cases_to_run.sh index 341d1c4801..0d06a85df0 100755 --- a/.github/jobs/get_use_cases_to_run.sh +++ b/.github/jobs/get_use_cases_to_run.sh @@ -47,9 +47,9 @@ echo Array of groups to run is: $matrix # if matrix is still empty, exit 1 to fail step and skip rest of workflow if [ "$matrix" == "[]" ]; then echo No tests to run! - echo ::set-output name=run_some_tests::false + echo "run_some_tests=false" >> $GITHUB_OUTPUT exit 0 fi -echo ::set-output name=run_some_tests::true -echo ::set-output name=matrix::{\"categories\":$(echo $matrix)}\" +echo "run_some_tests=true" >> $GITHUB_OUTPUT +echo "matrix={\"categories\":$(echo $matrix)}\"" >> $GITHUB_OUTPUT diff --git a/.github/jobs/run_difference_tests.sh b/.github/jobs/run_difference_tests.sh index 609fa570e7..49e7242ec8 100755 --- a/.github/jobs/run_difference_tests.sh +++ b/.github/jobs/run_difference_tests.sh @@ -14,10 +14,10 @@ artifact_name=$2 .github/jobs/setup_and_run_diff.py ${matrix_categories} $artifact_name if [ "$( ls -A ${RUNNER_WORKSPACE}/diff)" ]; then - echo ::set-output name=upload_diff::true + echo "upload_diff=true" >> $GITHUB_OUTPUT mkdir -p artifact/diff-${artifact_name} cp -r ${RUNNER_WORKSPACE}/diff/* artifact/diff-${artifact_name} exit 2 fi -echo ::set-output name=upload_diff::false +echo "upload_diff=false" >> $GITHUB_OUTPUT diff --git a/.github/jobs/save_error_logs.sh b/.github/jobs/save_error_logs.sh index 0662056729..b2fe320b4b 100755 --- a/.github/jobs/save_error_logs.sh +++ b/.github/jobs/save_error_logs.sh @@ -8,7 +8,7 @@ .github/jobs/copy_error_logs.py ${RUNNER_WORKSPACE}/output artifact/error_logs if [ -d "artifact/error_logs" ]; then - echo ::set-output name=upload_error_logs::true + echo "upload_error_logs=true" >> $GITHUB_OUTPUT else - echo ::set-output name=upload_error_logs::false + echo "upload_error_logs=false" >> $GITHUB_OUTPUT fi diff --git a/.github/jobs/set_job_controls.sh b/.github/jobs/set_job_controls.sh index 432c57a89a..5e72bc273c 100755 --- a/.github/jobs/set_job_controls.sh +++ b/.github/jobs/set_job_controls.sh @@ -83,16 +83,16 @@ else fi fi -echo ::set-output name=run_get_image::$run_get_image -echo ::set-output name=run_get_input_data::$run_get_input_data -echo ::set-output name=run_diff::$run_diff -echo ::set-output name=run_save_truth_data::$run_save_truth_data -echo ::set-output name=external_trigger::$external_trigger +echo "run_get_image=$run_get_image" >> $GITHUB_OUTPUT +echo "run_get_input_data=$run_get_input_data" >> $GITHUB_OUTPUT +echo "run_diff=$run_diff" >> $GITHUB_OUTPUT +echo "run_save_truth_data=$run_save_truth_data" >> $GITHUB_OUTPUT +echo "external_trigger=$external_trigger" >> $GITHUB_OUTPUT # get branch name branch_name=`${GITHUB_WORKSPACE}/.github/jobs/print_branch_name.py` -echo ::set-output name=branch_name::$branch_name +echo "branch_name=$branch_name" >> $GITHUB_OUTPUT # get use cases to run .github/jobs/get_use_cases_to_run.sh $run_use_cases $run_all_use_cases $run_unit_tests diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 2f43da4edc..a14891b7fb 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -16,8 +16,8 @@ jobs: name: Documentation runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: python-version: '3.6' - name: Install dependencies @@ -26,12 +26,12 @@ jobs: python -m pip install python-dateutil requests Pillow - name: Build Documentation run: ./.github/jobs/build_documentation.sh - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: always() with: name: METplus_documentation path: artifact/documentation - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: failure() with: name: documentation_warnings.log diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 305e2e80f2..f60cb04e59 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -52,7 +52,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set job controls id: job_status run: .github/jobs/set_job_controls.sh @@ -75,8 +75,8 @@ jobs: needs: job_control if: ${{ needs.job_control.outputs.run_get_image == 'true' }} steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: python-version: '3.6' - name: Get METplus Image @@ -115,7 +115,7 @@ jobs: matrix: ${{fromJson(needs.job_control.outputs.matrix)}} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Free disk space run: .github/jobs/free_disk_space.sh @@ -130,7 +130,7 @@ jobs: id: get-artifact-name run: | artifact_name=`.github/jobs/get_artifact_name.sh ${{ matrix.categories }}` - echo ::set-output name=artifact_name::${artifact_name} + echo "artifact_name=${artifact_name}" >> $GITHUB_OUTPUT # run use case tests - name: Run Use Cases @@ -158,14 +158,14 @@ jobs: run: .github/jobs/copy_output_to_artifact.sh ${{ steps.get-artifact-name.outputs.artifact_name }} - name: Upload output data artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: ${{ always() && steps.run_tests.conclusion != 'skipped' && !startsWith(matrix.categories,'pytests') }} with: name: ${{ steps.get-artifact-name.outputs.artifact_name }} path: artifact/${{ steps.get-artifact-name.outputs.artifact_name }} - name: Upload error logs artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: ${{ always() && steps.save-errors.outputs.upload_error_logs }} with: name: error_logs @@ -173,7 +173,7 @@ jobs: if-no-files-found: ignore - name: Upload difference data artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: ${{ always() && steps.run-diff.outputs.upload_diff == 'true' }} with: name: diff-${{ steps.get-artifact-name.outputs.artifact_name }} @@ -186,8 +186,8 @@ jobs: needs: [use_case_tests] if: ${{ needs.job_control.outputs.run_save_truth_data == 'true' }} steps: - - uses: actions/checkout@v2 - - uses: actions/download-artifact@v2 + - uses: actions/checkout@v3 + - uses: actions/download-artifact@v3 - run: .github/jobs/create_output_data_volumes.sh env: DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}