From 8bd2df6fbd312db9715f0380623bb318ac5b3174 Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Sun, 23 Jun 2024 03:26:35 +0200 Subject: [PATCH 1/2] Bump to ubuntu 22.04 --- LICENSE | 2 +- docker-bake.hcl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index d47c8e2..0c00062 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 hpc-containerized +Copyright (c) 2024 cnts4sci build-machine Jusong Yu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/docker-bake.hcl b/docker-bake.hcl index 02f8cba..1fc3d37 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -15,7 +15,7 @@ variable "PLATFORMS" { } variable "SYSTEM_BASE_IMAGE" { - default = "ubuntu:20.04" + default = "ubuntu:22.04" } variable "TARGETS" { From 8ab4aca6887601a6dbbfca3e2e1b9c201f3e28cf Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Sun, 23 Jun 2024 03:32:45 +0200 Subject: [PATCH 2/2] Make DISTRO_VERSION exposed and set for tag of bm image --- .github/workflows/publish.yml | 2 ++ build.json | 3 +++ docker-bake.hcl | 5 ++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2bb3a9c..479511a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -56,7 +56,9 @@ jobs: images: ${{ inputs.registry }}/${{ github.repository_owner }}/${{ matrix.target }} tags: | type=edge,enable={{is_default_branch}} + type=ref,event=pr type=match,pattern=(\d{4}\.\d{4}(-.+)?),group=1 + type=raw,value=ubuntu-${{ env.DISTRO_VERSION }},enable=${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') && endsWith(matrix.target, 'bm') }} type=raw,value=v${{ env.OPENMPI_VERSION }},enable=${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') && endsWith(matrix.target, 'openmpi') }} type=raw,value=v${{ env.LAPACK_VERSION }},enable=${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') && endsWith(matrix.target, 'lapack') }} diff --git a/build.json b/build.json index 92dfb21..41e2aa6 100644 --- a/build.json +++ b/build.json @@ -1,5 +1,8 @@ { "variable": { + "DISTRO_VERSION": { + "default": "22.04" + }, "OPENMPI_VERSION": { "default": "4.1.6" }, diff --git a/docker-bake.hcl b/docker-bake.hcl index 1fc3d37..04764ca 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -14,8 +14,7 @@ variable "PLATFORMS" { default = ["linux/amd64"] } -variable "SYSTEM_BASE_IMAGE" { - default = "ubuntu:22.04" +variable "DISTRO_VERSION" { } variable "TARGETS" { @@ -44,7 +43,7 @@ target "bm" { tags = tags("bm") context = "bm" contexts = { - base-image = "docker-image://${SYSTEM_BASE_IMAGE}" + base-image = "docker-image://ubuntu:${DISTRO_VERSION}" } platforms = "${PLATFORMS}" }