Skip to content

Commit

Permalink
Fix warnings in Github Actions (#8241)
Browse files Browse the repository at this point in the history
* Updating action dependencies to newer versions that use the up to date version of node.js
* Fixing deprecated set-output usage see https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
* Fix typo fetch -> fetch-depth
  • Loading branch information
lbergelson authored Mar 23, 2023
1 parent b370c06 commit 148dd33
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 26 deletions.
9 changes: 5 additions & 4 deletions .github/actions/upload-gatk-test-results/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ runs:
steps:
- name: Upload test results
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
# ternary expression syntax is workaround found here https://github.com/actions/runner/issues/409
name: test-results-${{ inputs.is-docker == 'true' && 'docker-' || '' }}${{ matrix.Java }}-${{ matrix.testType }}
Expand All @@ -51,7 +51,8 @@ runs:
gsutil -m cp -z html -z js -z xml -z css -r build/reports/tests gs:/${{ env.HELLBENDER_TEST_LOGS }}${{ inputs.repo-path }}/;
VIEW_URL=https://storage.googleapis.com${{ env.HELLBENDER_TEST_LOGS }}${{ inputs.repo-path }}/tests/testOnPackagedReleaseJar/index.html
echo "See the test report at ${VIEW_URL}";
echo ::set-output name=view_url::"${VIEW_URL}"
echo view_url="${VIEW_URL}" >> $GITHUB_OUTPUT
shell: bash

# This code is necessary in order to extract the URL for the logs for a particular run. The github context exposes the run_id object
Expand All @@ -69,8 +70,8 @@ runs:
eval "$(curl --get -Ss -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" "${GITHUB_BASEURL}${GITHUB_API}?per_page=30" \
| jq -r --arg job_name "${{ inputs.identifier }}" '.jobs | map(select(.name == $job_name)) | .[0] | @sh "job_id=\(.id) html_url=\(.html_url)"')"
echo ::set-output name=job_id::"${job_id}"
echo ::set-output name=html_url::"${html_url}"
echo job_id="${job_id}" >> $GITHUB_OUTPUT
echo html_url="${html_url}" >> $GITHUB_OUTPUT
echo ${job_id}
echo ${html_url}
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gatk-nightly-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout gatk
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down
42 changes: 21 additions & 21 deletions .github/workflows/gatk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,37 +32,37 @@ jobs:
env:
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}
if: "${{ env.GCP_CREDENTIALS != '' }}"
run: echo "::set-output name=defined::true"
run: echo defined=true >> $GITHUB_OUTPUT


buildDocker:
name: build and push gatk docker to artifacts
runs-on: ubuntu-latest
steps:
- name: checkout gatk
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=${{github.sha}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
uses: docker/build-push-action@v4
with:
context: .
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=docker,dest=/tmp/myimage.tar
# By uploading the docker image as an artifact we save ourselves the requirement for the image to be built with ghcr push permission
- name: Upload docker image as artifact
uses: actions/upload-artifact@v2
- name: Upload docker image as artifact
uses: actions/upload-artifact@v3
with:
name: gatkDockerImage
path: /tmp/myimage.tar
Expand All @@ -84,11 +84,11 @@ jobs:
SCALA_VERSION: ${{ matrix.scalaVersion }}
name: Java ${{ matrix.Java }} build and test ${{ matrix.testType }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 'Set up java ${{ matrix.Java }}'
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.Java }}
distribution: 'temurin'
Expand Down Expand Up @@ -157,12 +157,12 @@ jobs:

name: Java ${{ matrix.Java }} test on docker ${{matrix.testType}}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0 #TODO make this shallow

- name: 'Set up java ${{ matrix.Java }}'
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.Java }}
distribution: 'temurin'
Expand Down Expand Up @@ -199,7 +199,7 @@ jobs:
cp scripts/docker/dockertest.gradle .
- name: Download docker image artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: gatkDockerImage
path: /tmp
Expand Down Expand Up @@ -247,11 +247,11 @@ jobs:
runs-on: ubuntu-latest
name: Validate script WDLs using womtools
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch: 0
fetch-depth: 0
- name: Set up java 17
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
Expand All @@ -267,11 +267,11 @@ jobs:
runs-on: ubuntu-latest
name: Validate generated WDLs using womtools
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch: 0
fetch-depth: 0
- name: Set up java 17
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
Expand All @@ -292,13 +292,13 @@ jobs:
continue-on-error: true
name: WDL test ${{ matrix.wdlTest }} on cromwell
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: pull lfs files
run: git lfs pull
- name: Set up java 17
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
Expand Down Expand Up @@ -351,4 +351,4 @@ jobs:
if: ${{ matrix.wdlTest == 'RUN_VCF_SITE_LEVEL_FILTERING_WDL' }}
run: |
echo "Running VCF Site Level Filtering WDL";
bash scripts/vcf_site_level_filtering_cromwell_tests/run_vcf_site_level_filtering_wdl.sh;
bash scripts/vcf_site_level_filtering_cromwell_tests/run_vcf_site_level_filtering_wdl.sh;

0 comments on commit 148dd33

Please sign in to comment.