From 1f37fb548750aad607827dfe478d424d2d1162a6 Mon Sep 17 00:00:00 2001 From: Shane St Savage Date: Sun, 4 Aug 2024 09:46:26 -0700 Subject: [PATCH 1/3] Update Docker image GHA with new base images/runners --- .../{push.yml => build_docker_image.yml} | 15 +++++++-------- .github/workflows/erddap_version.yml | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) rename .github/workflows/{push.yml => build_docker_image.yml} (86%) diff --git a/.github/workflows/push.yml b/.github/workflows/build_docker_image.yml similarity index 86% rename from .github/workflows/push.yml rename to .github/workflows/build_docker_image.yml index 653b9ef..1028fa0 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/build_docker_image.yml @@ -1,4 +1,4 @@ -name: Push +name: Build Docker images on: workflow_dispatch: @@ -15,21 +15,20 @@ env: jobs: build: name: Build and test Docker Image - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 timeout-minutes: 10 strategy: - #NOTE: make sure to replicate this matrix config in the push job below matrix: include: #amd64 - platform: "linux/amd64" tag: "jdk17-openjdk" - base: "tomcat:10.1.16-jdk17-temurin-jammy@sha256:5d06ae2052b1a4c636454e65360a712fd262eebf574f8a97f37c2580edce7d46" + base: "${{ vars.TOMCAT_AMD64_IMAGE }}" #arm64/v8 - platform: "linux/arm64/v8" tag: "jdk17-openjdk" - base: "tomcat:10.1.16-jdk17-temurin-jammy@sha256:7d930ac5ba9091aa12c1a42e3cc7c59c12c8d032e076c3713c10bb9b35227b5d" + base: "${{ vars.TOMCAT_ARM64_IMAGE }}" steps: - name: Checkout @@ -82,7 +81,7 @@ jobs: push: name: Push latest image to Docker Hub - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 timeout-minutes: 10 needs: build if: (github.event_name == 'release' && github.event.action == 'published') || (github.ref == 'refs/heads/main') && github.repository == 'axiom-data-science/docker-erddap' @@ -93,11 +92,11 @@ jobs: #amd64 - platform: "linux/amd64" tag: "jdk17-openjdk" - base: "tomcat:10.1.16-jdk17-temurin-jammy@sha256:5d06ae2052b1a4c636454e65360a712fd262eebf574f8a97f37c2580edce7d46" + base: "${{ vars.TOMCAT_AMD64_IMAGE }}" #arm64/v8 - platform: "linux/arm64/v8" tag: "jdk17-openjdk" - base: "tomcat:10.1.16-jdk17-temurin-jammy@sha256:7d930ac5ba9091aa12c1a42e3cc7c59c12c8d032e076c3713c10bb9b35227b5d" + base: "${{ vars.TOMCAT_ARM64_IMAGE }}" steps: - name: Checkout diff --git a/.github/workflows/erddap_version.yml b/.github/workflows/erddap_version.yml index ed58899..b42773e 100644 --- a/.github/workflows/erddap_version.yml +++ b/.github/workflows/erddap_version.yml @@ -11,7 +11,7 @@ on: jobs: version: name: Check the current ERDDAP version - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 timeout-minutes: 5 if: github.repository == 'axiom-data-science/docker-erddap' From 2c0d26b5d2508f888baf94af127863eb274f73e8 Mon Sep 17 00:00:00 2001 From: Shane St Savage Date: Sun, 4 Aug 2024 10:12:30 -0700 Subject: [PATCH 2/3] Upgrade most GHA action versions --- .github/workflows/build_docker_image.yml | 24 ++++++++++++------------ .github/workflows/erddap_version.yml | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build_docker_image.yml b/.github/workflows/build_docker_image.yml index 1028fa0..fc5a7f0 100644 --- a/.github/workflows/build_docker_image.yml +++ b/.github/workflows/build_docker_image.yml @@ -32,11 +32,11 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v4 - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | axiom/docker-erddap @@ -45,10 +45,10 @@ jobs: type=raw,value=${{ github.event.release.tag_name }},suffix=-${{ matrix.tag }},enable=${{ github.event_name == 'release' && github.event.action == 'published' }} - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ${ BUILDX_CACHE } key: ${ CACHE_KEY }${{ github.sha }} @@ -56,7 +56,7 @@ jobs: ${ CACHE_KEY } - name: Build image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v6 with: push: false platforms: ${{ matrix.platform }} @@ -100,11 +100,11 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v4 - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | axiom/docker-erddap @@ -113,10 +113,10 @@ jobs: type=raw,value=${{ github.event.release.tag_name }},suffix=-${{ matrix.tag }},enable=${{ github.event_name == 'release' && github.event.action == 'published' }} - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ${ BUILDX_CACHE } key: ${ CACHE_KEY }${{ github.sha }} @@ -124,13 +124,13 @@ jobs: ${ CACHE_KEY } - name: Login to Docker Hub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Push to Docker Hub - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v6 with: push: true platforms: ${{ matrix.platform }} @@ -142,7 +142,7 @@ jobs: cache-to: type=local,dest=${ BUILDX_CACHE } - name: Update repo description - uses: peter-evans/dockerhub-description@v3 + uses: peter-evans/dockerhub-description@v4 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} diff --git a/.github/workflows/erddap_version.yml b/.github/workflows/erddap_version.yml index b42773e..a734458 100644 --- a/.github/workflows/erddap_version.yml +++ b/.github/workflows/erddap_version.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v4 - name: Get ERDDAP versions, and create an issue if it is out of date uses: actions/github-script@v3 From c8ef3b53360769d429b2ed6af036c495cec34cca Mon Sep 17 00:00:00 2001 From: Shane St Savage Date: Sun, 4 Aug 2024 10:15:56 -0700 Subject: [PATCH 3/3] Update GHA jdk verison tag --- .github/workflows/build_docker_image.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_docker_image.yml b/.github/workflows/build_docker_image.yml index fc5a7f0..38f6bb4 100644 --- a/.github/workflows/build_docker_image.yml +++ b/.github/workflows/build_docker_image.yml @@ -23,11 +23,11 @@ jobs: include: #amd64 - platform: "linux/amd64" - tag: "jdk17-openjdk" + tag: "jdk21-openjdk" base: "${{ vars.TOMCAT_AMD64_IMAGE }}" #arm64/v8 - platform: "linux/arm64/v8" - tag: "jdk17-openjdk" + tag: "jdk21-openjdk" base: "${{ vars.TOMCAT_ARM64_IMAGE }}" steps: