Skip to content

Commit

Permalink
Make DISTRO_VERSION exposed and set for tag of bm image
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed Jun 23, 2024
1 parent 8bd2df6 commit 8ab4aca
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Expand Down
3 changes: 3 additions & 0 deletions build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"variable": {
"DISTRO_VERSION": {
"default": "22.04"
},
"OPENMPI_VERSION": {
"default": "4.1.6"
},
Expand Down
5 changes: 2 additions & 3 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ variable "PLATFORMS" {
default = ["linux/amd64"]
}

variable "SYSTEM_BASE_IMAGE" {
default = "ubuntu:22.04"
variable "DISTRO_VERSION" {
}

variable "TARGETS" {
Expand Down Expand Up @@ -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}"
}
Expand Down

0 comments on commit 8ab4aca

Please sign in to comment.