Skip to content

Commit 4594b67

Browse files
committed
Fix falling compiler version selection
1 parent 3031339 commit 4594b67

File tree

3 files changed

+40
-36
lines changed

3 files changed

+40
-36
lines changed

.github/workflows/debian.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ env:
1212
BUILDKIT_PROGRESS: plain
1313
CONAN_VERSION: 2.17.0
1414
NONROOT_USER: ci
15+
FALLBACK_GCC: 12
16+
FALLBACK_CLANG: 16
1517

1618
jobs:
1719
# Build the Docker image for Debian using different versions of GCC and Clang.
@@ -77,32 +79,33 @@ jobs:
7779
id: meta
7880
uses: docker/metadata-action@v5
7981
with:
80-
images: ${{ env.CONTAINER_IMAGE }}
81-
tags: |
82-
type=raw,value=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}
83-
type=sha,prefix=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}-sha-
84-
labels: |
85-
org.opencontainers.image.authors=For inquiries, please use https://github.com/XRPLF/ci/issues
86-
org.opencontainers.image.documentation=https://github.com/XRPLF/ci
87-
org.opencontainers.image.vendor=XRPLF
88-
org.opencontainers.image.title=${{ env.CONTAINER_REPOSITORY }}
82+
images: ${{ env.CONTAINER_IMAGE }}
83+
tags: |
84+
type=raw,value=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}
85+
type=sha,prefix=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}-sha-
86+
labels: |
87+
org.opencontainers.image.authors=For inquiries, please use https://github.com/XRPLF/ci/issues
88+
org.opencontainers.image.documentation=https://github.com/XRPLF/ci
89+
org.opencontainers.image.vendor=XRPLF
90+
org.opencontainers.image.title=${{ env.CONTAINER_REPOSITORY }}
8991
- name: Build and push the Docker image
9092
uses: docker/build-push-action@v6
9193
with:
9294
build-args: |
9395
BUILDKIT_DOCKERFILE_CHECK=skip=InvalidDefaultArgInFrom
9496
BUILDKIT_INLINE_CACHE=1
95-
CLANG_VERSION=${{ matrix.os.compiler_name == 'clang' && matrix.os.compiler_version || '' }}
97+
CLANG_VERSION=${{ matrix.os.compiler_name == 'clang' && matrix.os.compiler_version || env.FALLBACK_CLANG }}
98+
GCC_VERSION=${{ matrix.os.compiler_name == 'gcc' && matrix.os.compiler_version || env.FALLBACK_GCC }}
9699
CONAN_VERSION=${{ env.CONAN_VERSION }}
97-
DEBIAN_VERSION=${{ matrix.os.release }}
98-
GCC_VERSION=${{ matrix.os.compiler_name == 'gcc' && matrix.os.compiler_version || '' }}
99100
GITHUB_REPO=${{ github.repository }}
100101
NONROOT_USER=${{ env.NONROOT_USER }}
102+
DEBIAN_VERSION=${{ matrix.os.release }}
101103
context: docker/debian
102104
outputs: type=image,name=${{ env.CONTAINER_IMAGE }},push-by-digest=true,name-canonical=true,push=true
103105
platforms: ${{ matrix.architecture.platform }}
104106
provenance: mode=max
105107
push: true
106108
sbom: true
109+
tags: ${{ steps.meta.outputs.tags }}
107110
labels: ${{ steps.meta.outputs.labels }}
108111
target: ${{ matrix.os.compiler_name }}

.github/workflows/rhel.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ jobs:
3232
- release: 9.6
3333
compiler_name: gcc
3434
compiler_version: 14
35-
- release: 9.6
36-
compiler_name: clang
37-
compiler_version: ''
3835
runs-on: ${{ matrix.architecture.runner }}
3936
permissions:
4037
packages: write
@@ -70,23 +67,23 @@ jobs:
7067
id: meta
7168
uses: docker/metadata-action@v5
7269
with:
73-
images: ${{ env.CONTAINER_IMAGE }}
74-
tags: |
75-
type=raw,value=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}
76-
type=sha,prefix=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}-sha-
77-
labels: |
78-
org.opencontainers.image.authors=For inquiries, please use https://github.com/XRPLF/ci/issues
79-
org.opencontainers.image.documentation=https://github.com/XRPLF/ci
80-
org.opencontainers.image.vendor=XRPLF
81-
org.opencontainers.image.title=${{ env.CONTAINER_REPOSITORY }}
70+
images: ${{ env.CONTAINER_IMAGE }}
71+
tags: |
72+
type=raw,value=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}
73+
type=sha,prefix=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}-sha-
74+
labels: |
75+
org.opencontainers.image.authors=For inquiries, please use https://github.com/XRPLF/ci/issues
76+
org.opencontainers.image.documentation=https://github.com/XRPLF/ci
77+
org.opencontainers.image.vendor=XRPLF
78+
org.opencontainers.image.title=${{ env.CONTAINER_REPOSITORY }}
8279
- name: Build and push the Docker image
8380
uses: docker/build-push-action@v6
8481
with:
8582
build-args: |
8683
BUILDKIT_DOCKERFILE_CHECK=skip=InvalidDefaultArgInFrom
8784
BUILDKIT_INLINE_CACHE=1
8885
CONAN_VERSION=${{ env.CONAN_VERSION }}
89-
GCC_VERSION=${{ matrix.os.compiler_name == 'gcc' && matrix.os.compiler_version || '' }}
86+
GCC_VERSION=${{ matrix.os.compiler_version }}
9087
GITHUB_REPO=${{ github.repository }}
9188
NONROOT_USER=${{ env.NONROOT_USER }}
9289
RHEL_VERSION=${{ matrix.os.release }}
@@ -96,5 +93,6 @@ jobs:
9693
provenance: mode=max
9794
push: true
9895
sbom: true
96+
tags: ${{ steps.meta.outputs.tags }}
9997
labels: ${{ steps.meta.outputs.labels }}
10098
target: ${{ matrix.os.compiler_name }}

.github/workflows/ubuntu.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ env:
1212
BUILDKIT_PROGRESS: plain
1313
CONAN_VERSION: 2.17.0
1414
NONROOT_USER: ci
15+
FALLBACK_GCC: 12
16+
FALLBACK_CLANG: 16
1517

1618
jobs:
1719
# Build the Docker image for Ubuntu using different versions of GCC and Clang.
@@ -75,24 +77,24 @@ jobs:
7577
id: meta
7678
uses: docker/metadata-action@v5
7779
with:
78-
images: ${{ env.CONTAINER_IMAGE }}
79-
tags: |
80-
type=raw,value=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}
81-
type=sha,prefix=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}-sha-
82-
labels: |
83-
org.opencontainers.image.authors=For inquiries, please use https://github.com/XRPLF/ci/issues
84-
org.opencontainers.image.documentation=https://github.com/XRPLF/ci
85-
org.opencontainers.image.vendor=XRPLF
86-
org.opencontainers.image.title=${{ env.CONTAINER_REPOSITORY }}
80+
images: ${{ env.CONTAINER_IMAGE }}
81+
tags: |
82+
type=raw,value=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}
83+
type=sha,prefix=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}-sha-
84+
labels: |
85+
org.opencontainers.image.authors=For inquiries, please use https://github.com/XRPLF/ci/issues
86+
org.opencontainers.image.documentation=https://github.com/XRPLF/ci
87+
org.opencontainers.image.vendor=XRPLF
88+
org.opencontainers.image.title=${{ env.CONTAINER_REPOSITORY }}
8789
- name: Build and push the Docker image
8890
uses: docker/build-push-action@v6
8991
with:
9092
build-args: |
9193
BUILDKIT_DOCKERFILE_CHECK=skip=InvalidDefaultArgInFrom
9294
BUILDKIT_INLINE_CACHE=1
93-
CLANG_VERSION=${{ matrix.os.compiler_name == 'clang' && matrix.os.compiler_version || '' }}
95+
CLANG_VERSION=${{ matrix.os.compiler_name == 'clang' && matrix.os.compiler_version || env.FALLBACK_CLANG }}
96+
GCC_VERSION=${{ matrix.os.compiler_name == 'gcc' && matrix.os.compiler_version || env.FALLBACK_GCC }}
9497
CONAN_VERSION=${{ env.CONAN_VERSION }}
95-
GCC_VERSION=${{ matrix.os.compiler_name == 'gcc' && matrix.os.compiler_version || '' }}
9698
GITHUB_REPO=${{ github.repository }}
9799
NONROOT_USER=${{ env.NONROOT_USER }}
98100
UBUNTU_VERSION=${{ matrix.os.release }}
@@ -102,5 +104,6 @@ jobs:
102104
provenance: mode=max
103105
push: true
104106
sbom: true
107+
tags: ${{ steps.meta.outputs.tags }}
105108
labels: ${{ steps.meta.outputs.labels }}
106109
target: ${{ matrix.os.compiler_name }}

0 commit comments

Comments
 (0)