Skip to content

Commit 413c6db

Browse files
committed
Fix falling compiler version selection
1 parent 3031339 commit 413c6db

File tree

3 files changed

+40
-39
lines changed

3 files changed

+40
-39
lines changed

.github/workflows/debian.yml

Lines changed: 15 additions & 13 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,32 @@ 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
105-
push: true
107+
push: ${{ github.event_name != 'pull_request' }}
106108
sbom: true
107109
labels: ${{ steps.meta.outputs.labels }}
108110
target: ${{ matrix.os.compiler_name }}

.github/workflows/rhel.yml

Lines changed: 11 additions & 14 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,31 +67,31 @@ 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 }}
9390
context: docker/rhel
9491
outputs: type=image,name=${{ env.CONTAINER_IMAGE }},push-by-digest=true,name-canonical=true,push=true
9592
platforms: ${{ matrix.architecture.platform }}
9693
provenance: mode=max
97-
push: true
94+
push: ${{ github.event_name != 'pull_request' }}
9895
sbom: true
9996
labels: ${{ steps.meta.outputs.labels }}
10097
target: ${{ matrix.os.compiler_name }}

.github/workflows/ubuntu.yml

Lines changed: 14 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 Ubuntu using different versions of GCC and Clang.
@@ -75,32 +77,32 @@ 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 }}
99101
context: docker/ubuntu
100102
outputs: type=image,name=${{ env.CONTAINER_IMAGE }},push-by-digest=true,name-canonical=true,push=true
101103
platforms: ${{ matrix.architecture.platform }}
102104
provenance: mode=max
103-
push: true
105+
push: ${{ github.event_name != 'pull_request' }}
104106
sbom: true
105107
labels: ${{ steps.meta.outputs.labels }}
106108
target: ${{ matrix.os.compiler_name }}

0 commit comments

Comments
 (0)