Skip to content

Commit 01f14a0

Browse files
bthomeeBronek
authored andcommitted
Review feedback
1 parent 3ccafe2 commit 01f14a0

File tree

9 files changed

+24
-52
lines changed

9 files changed

+24
-52
lines changed

.github/workflows/debian.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ jobs:
8787
type=raw,value=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}
8888
type=sha,prefix=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}-sha-
8989
labels: |
90-
org.opencontainers.image.authors=For inquiries, please use https://github.com/XRPLF/ci/issues
91-
org.opencontainers.image.documentation=https://github.com/XRPLF/ci
90+
org.opencontainers.image.authors=For inquiries, please use https://${{ github.repository }}/issues
91+
org.opencontainers.image.documentation=https://${{ github.repository }}
9292
org.opencontainers.image.vendor=XRPLF
9393
org.opencontainers.image.title=${{ env.CONTAINER_REPOSITORY }}
9494
- name: Build and push the Docker image
@@ -108,19 +108,19 @@ jobs:
108108
outputs: type=image,name=${{ env.CONTAINER_IMAGE }},push-by-digest=true,name-canonical=true,push=true
109109
platforms: ${{ matrix.architecture.platform }}
110110
provenance: mode=max
111-
push: ${{ github.ref_type == 'branch' && github.ref_name == 'main' }}
111+
push: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
112112
sbom: true
113113
labels: ${{ steps.meta.outputs.labels }}
114114
target: ${{ matrix.os.compiler_name }}
115115
- name: Export digest
116-
if: ${{ github.ref_type == 'branch' && github.ref_name == 'main' }}
116+
if: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
117117
shell: bash
118118
run: |
119119
mkdir -p /tmp/digests
120120
DIGEST="${{ steps.build.outputs.digest }}"
121121
touch "/tmp/digests/${DIGEST#sha256:}"
122122
- name: Upload digest
123-
if: ${{ github.ref_type == 'branch' && github.ref_name == 'main' }}
123+
if: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
124124
uses: actions/upload-artifact@v4
125125
with:
126126
name: digests-${{ matrix.os.release }}-${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}-${{ env.PLATFORM_PAIR }}
@@ -129,7 +129,7 @@ jobs:
129129
retention-days: 1
130130

131131
merge:
132-
if: ${{ github.ref_type == 'branch' && github.ref_name == 'main' }}
132+
if: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
133133
strategy:
134134
matrix:
135135
os:

.github/workflows/rhel.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ jobs:
7878
type=raw,value=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}
7979
type=sha,prefix=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}-sha-
8080
labels: |
81-
org.opencontainers.image.authors=For inquiries, please use https://github.com/XRPLF/ci/issues
82-
org.opencontainers.image.documentation=https://github.com/XRPLF/ci
81+
org.opencontainers.image.authors=For inquiries, please use https://${{ github.repository }}/issues
82+
org.opencontainers.image.documentation=https://${{ github.repository }}
8383
org.opencontainers.image.vendor=XRPLF
8484
org.opencontainers.image.title=${{ env.CONTAINER_REPOSITORY }}
8585
- name: Build and push the Docker image
@@ -98,19 +98,19 @@ jobs:
9898
outputs: type=image,name=${{ env.CONTAINER_IMAGE }},push-by-digest=true,name-canonical=true,push=true
9999
platforms: ${{ matrix.architecture.platform }}
100100
provenance: mode=max
101-
push: ${{ github.ref_type == 'branch' && github.ref_name == 'main' }}
101+
push: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
102102
sbom: true
103103
labels: ${{ steps.meta.outputs.labels }}
104104
target: ${{ matrix.os.compiler_name }}
105105
- name: Export digest
106-
if: ${{ github.ref_type == 'branch' && github.ref_name == 'main' }}
106+
if: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
107107
shell: bash
108108
run: |
109109
mkdir -p /tmp/digests
110110
DIGEST="${{ steps.build.outputs.digest }}"
111111
touch "/tmp/digests/${DIGEST#sha256:}"
112112
- name: Upload digest
113-
if: ${{ github.ref_type == 'branch' && github.ref_name == 'main' }}
113+
if: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
114114
uses: actions/upload-artifact@v4
115115
with:
116116
name: digests-${{ matrix.os.release }}-${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}-${{ env.PLATFORM_PAIR }}
@@ -119,7 +119,7 @@ jobs:
119119
retention-days: 1
120120

121121
merge:
122-
if: ${{ github.ref_type == 'branch' && github.ref_name == 'main' }}
122+
if: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
123123
strategy:
124124
matrix:
125125
os:

.github/workflows/ubuntu.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ jobs:
8585
type=raw,value=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}
8686
type=sha,prefix=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}-sha-
8787
labels: |
88-
org.opencontainers.image.authors=For inquiries, please use https://github.com/XRPLF/ci/issues
89-
org.opencontainers.image.documentation=https://github.com/XRPLF/ci
88+
org.opencontainers.image.authors=For inquiries, please use https://${{ github.repository }}/issues
89+
org.opencontainers.image.documentation=https://${{ github.repository }}
9090
org.opencontainers.image.vendor=XRPLF
9191
org.opencontainers.image.title=${{ env.CONTAINER_REPOSITORY }}
9292
- name: Build and push the Docker image
@@ -106,19 +106,19 @@ jobs:
106106
outputs: type=image,name=${{ env.CONTAINER_IMAGE }},push-by-digest=true,name-canonical=true,push=true
107107
platforms: ${{ matrix.architecture.platform }}
108108
provenance: mode=max
109-
push: ${{ github.ref_type == 'branch' && github.ref_name == 'main' }}
109+
push: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
110110
sbom: true
111111
labels: ${{ steps.meta.outputs.labels }}
112112
target: ${{ matrix.os.compiler_name }}
113113
- name: Export digest
114-
if: ${{ github.ref_type == 'branch' && github.ref_name == 'main' }}
114+
if: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
115115
shell: bash
116116
run: |
117117
mkdir -p /tmp/digests
118118
DIGEST="${{ steps.build.outputs.digest }}"
119119
touch "/tmp/digests/${DIGEST#sha256:}"
120120
- name: Upload digest
121-
if: ${{ github.ref_type == 'branch' && github.ref_name == 'main' }}
121+
if: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
122122
uses: actions/upload-artifact@v4
123123
with:
124124
name: digests-${{ matrix.os.release }}-${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}-${{ env.PLATFORM_PAIR }}
@@ -127,7 +127,7 @@ jobs:
127127
retention-days: 1
128128

129129
merge:
130-
if: ${{ github.ref_type == 'branch' && github.ref_name == 'main' }}
130+
if: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
131131
strategy:
132132
matrix:
133133
os:

docker/debian/Dockerfile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ FROM debian:${DEBIAN_VERSION} AS base
1717
SHELL ["/bin/bash", "-c"]
1818
ENTRYPOINT ["/bin/bash"]
1919

20-
# Associate the image with the repository.
21-
ARG GITHUB_REPO
22-
LABEL org.opencontainers.image.source=https://github.com/${GITHUB_REPO}
23-
2420
# Ensure any packages installed directly or indirectly via dpkg do not require
2521
# manual interaction.
2622
ARG DEBIAN_FRONTEND=noninteractive
@@ -118,7 +114,6 @@ set -ex
118114
curl --no-progress-meter https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor -o /etc/apt/keyrings/llvm.gpg
119115
printf "%s\n%s\n" \
120116
"deb [signed-by=/etc/apt/keyrings/llvm.gpg] https://apt.llvm.org/${DEBIAN_VERSION}/ llvm-toolchain-${DEBIAN_VERSION}-${CLANG_VERSION} main" \
121-
"deb-src [signed-by=/etc/apt/keyrings/llvm.gpg] https://apt.llvm.org/${DEBIAN_VERSION}/ llvm-toolchain-${DEBIAN_VERSION}-${CLANG_VERSION} main" \
122117
| tee /etc/apt/sources.list.d/llvm.list
123118
apt update
124119
apt install -t llvm-toolchain-${DEBIAN_VERSION}-${CLANG_VERSION} -y --no-install-recommends clang-${CLANG_VERSION} llvm-${CLANG_VERSION}

docker/debian/README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,11 @@ Ensure you've run the login command above to authenticate with the Docker
3737
registry.
3838

3939
```shell
40-
GITHUB_REPO=XRPLF/ci
4140
NONROOT_USER=${USER}
4241
DEBIAN_VERSION=bookworm
4342
GCC_VERSION=12
4443
CONAN_VERSION=2.17.0
45-
CONTAINER_IMAGE=xrplf/ci/debian-${DEBIAN_VERSION}:gcc${GCC_VERSION}
44+
CONTAINER_IMAGE=xrplf/ci/debian-${DEBIAN_VERSION}:gcc-${GCC_VERSION}
4645

4746
DOCKER_BUILDKIT=1 docker build . \
4847
--target gcc \
@@ -51,7 +50,6 @@ DOCKER_BUILDKIT=1 docker build . \
5150
--build-arg CONAN_VERSION=${CONAN_VERSION} \
5251
--build-arg DEBIAN_VERSION=${DEBIAN_VERSION} \
5352
--build-arg GCC_VERSION=${GCC_VERSION} \
54-
--build-arg GITHUB_REPO=${GITHUB_REPO} \
5553
--build-arg NONROOT_USER=${NONROOT_USER} \
5654
--tag ${CONTAINER_REGISTRY}/${CONTAINER_IMAGE}
5755
```
@@ -62,12 +60,11 @@ Ensure you've run the login command above to authenticate with the Docker
6260
registry.
6361

6462
```shell
65-
GITHUB_REPO=XRPLF/ci
6663
NONROOT_USER=${USER}
6764
DEBIAN_VERSION=bookworm
6865
CLANG_VERSION=17
6966
CONAN_VERSION=2.17.0
70-
CONTAINER_IMAGE=xrplf/ci/debian-${DEBIAN_VERSION}:clang${CLANG_VERSION}
67+
CONTAINER_IMAGE=xrplf/ci/debian-${DEBIAN_VERSION}:clang-${CLANG_VERSION}
7168

7269
DOCKER_BUILDKIT=1 docker build . \
7370
--target clang \
@@ -76,7 +73,6 @@ DOCKER_BUILDKIT=1 docker build . \
7673
--build-arg CLANG_VERSION=${CLANG_VERSION} \
7774
--build-arg CONAN_VERSION=${CONAN_VERSION} \
7875
--build-arg DEBIAN_VERSION=${DEBIAN_VERSION} \
79-
--build-arg GITHUB_REPO=${GITHUB_REPO} \
8076
--build-arg NONROOT_USER=${NONROOT_USER} \
8177
--tag ${CONTAINER_REGISTRY}/${CONTAINER_IMAGE}
8278
```

docker/rhel/Dockerfile

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,10 @@ RUN dnf -y install bison flex
1010
# ====================== BASE IMAGE ======================
1111
FROM registry.redhat.io/ubi${RHEL_VERSION%.*}/s2i-base:${RHEL_VERSION} AS base
1212

13-
# Change to the root user to install packages.
14-
USER root
15-
1613
# Use Bash as the default shell for RUN commands and as the entrypoint.
1714
SHELL ["/bin/bash", "-c"]
1815
ENTRYPOINT ["/bin/bash"]
1916

20-
# Associate the image with the repository.
21-
ARG GITHUB_REPO
22-
LABEL org.opencontainers.image.source=https://github.com/${GITHUB_REPO}
23-
2417
# Update the packages installed on the system.
2518
RUN dnf -y update-minimal --security --sec-severity=Important --sec-severity=Critical
2619

docker/rhel/README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,18 @@ Ensure you've run the login command above to authenticate with the Docker
5656
registry.
5757

5858
```shell
59-
GITHUB_REPO=XRPLF/ci
6059
NONROOT_USER=${USER}
6160
RHEL_VERSION=9.6
6261
GCC_VERSION=13
6362
CONAN_VERSION=2.17.0
64-
CONTAINER_IMAGE=xrplf/ci/rhel-${RHEL_VERSION}:gcc${GCC_VERSION}
63+
CONTAINER_IMAGE=xrplf/ci/rhel-${RHEL_VERSION}:gcc-${GCC_VERSION}
6564

6665
DOCKER_BUILDKIT=1 docker build . \
6766
--target gcc \
6867
--build-arg BUILDKIT_DOCKERFILE_CHECK=skip=InvalidDefaultArgInFrom \
6968
--build-arg BUILDKIT_INLINE_CACHE=1 \
7069
--build-arg CONAN_VERSION=${CONAN_VERSION} \
7170
--build-arg GCC_VERSION=${GCC_VERSION} \
72-
--build-arg GITHUB_REPO=${GITHUB_REPO} \
7371
--build-arg NONROOT_USER=${NONROOT_USER} \
7472
--build-arg RHEL_VERSION=${RHEL_VERSION} \
7573
--tag ${CONTAINER_REGISTRY}/${CONTAINER_IMAGE}
@@ -81,18 +79,16 @@ Ensure you've run the login command above to authenticate with the Docker
8179
registry.
8280

8381
```shell
84-
GITHUB_REPO=XRPLF/ci
8582
NONROOT_USER=${USER}
8683
RHEL_VERSION=9.6
8784
CONAN_VERSION=2.17.0
88-
CONTAINER_IMAGE=xrplf/ci/rhel-${RHEL_VERSION}:clang${CLANG_VERSION}
85+
CONTAINER_IMAGE=xrplf/ci/rhel-${RHEL_VERSION}:clang-${CLANG_VERSION}
8986

9087
DOCKER_BUILDKIT=1 docker build . \
9188
--target clang \
9289
--build-arg BUILDKIT_DOCKERFILE_CHECK=skip=InvalidDefaultArgInFrom \
9390
--build-arg BUILDKIT_INLINE_CACHE=1 \
9491
--build-arg CONAN_VERSION=${CONAN_VERSION} \
95-
--build-arg GITHUB_REPO=${GITHUB_REPO} \
9692
--build-arg NONROOT_USER=${NONROOT_USER} \
9793
--build-arg RHEL_VERSION=${RHEL_VERSION} \
9894
--tag ${CONTAINER_REGISTRY}/${CONTAINER_IMAGE}

docker/ubuntu/Dockerfile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ FROM ubuntu:${UBUNTU_VERSION} AS base
66
SHELL ["/bin/bash", "-c"]
77
ENTRYPOINT ["/bin/bash"]
88

9-
# Associate the image with the repository.
10-
ARG GITHUB_REPO
11-
LABEL org.opencontainers.image.source=https://github.com/${GITHUB_REPO}
12-
139
# Ensure any packages installed directly or indirectly via dpkg do not require
1410
# manual interaction.
1511
ARG DEBIAN_FRONTEND=noninteractive

docker/ubuntu/README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,18 @@ Ensure you've run the login command above to authenticate with the Docker
3737
registry.
3838

3939
```shell
40-
GITHUB_REPO=XRPLF/ci
4140
NONROOT_USER=${USER}
4241
UBUNTU_VERSION=noble
4342
GCC_VERSION=14
4443
CONAN_VERSION=2.17.0
45-
CONTAINER_IMAGE=xrplf/ci/ubuntu-${UBUNTU_VERSION}:gcc${GCC_VERSION}
44+
CONTAINER_IMAGE=xrplf/ci/ubuntu-${UBUNTU_VERSION}:gcc-${GCC_VERSION}
4645

4746
DOCKER_BUILDKIT=1 docker build . \
4847
--target gcc \
4948
--build-arg BUILDKIT_DOCKERFILE_CHECK=skip=InvalidDefaultArgInFrom \
5049
--build-arg BUILDKIT_INLINE_CACHE=1 \
5150
--build-arg CONAN_VERSION=${CONAN_VERSION} \
5251
--build-arg GCC_VERSION=${GCC_VERSION} \
53-
--build-arg GITHUB_REPO=${GITHUB_REPO} \
5452
--build-arg NONROOT_USER=${NONROOT_USER} \
5553
--build-arg UBUNTU_VERSION=${UBUNTU_VERSION} \
5654
--tag ${CONTAINER_REGISTRY}/${CONTAINER_IMAGE}
@@ -62,20 +60,18 @@ Ensure you've run the login command above to authenticate with the Docker
6260
registry.
6361

6462
```shell
65-
GITHUB_REPO=XRPLF/ci
6663
NONROOT_USER=${USER}
6764
UBUNTU_VERSION=noble
6865
CLANG_VERSION=18
6966
CONAN_VERSION=2.17.0
70-
CONTAINER_IMAGE=xrplf/ci/ubuntu-${UBUNTU_VERSION}:clang${CLANG_VERSION}
67+
CONTAINER_IMAGE=xrplf/ci/ubuntu-${UBUNTU_VERSION}:clang-${CLANG_VERSION}
7168

7269
DOCKER_BUILDKIT=1 docker build . \
7370
--target clang \
7471
--build-arg BUILDKIT_DOCKERFILE_CHECK=skip=InvalidDefaultArgInFrom \
7572
--build-arg BUILDKIT_INLINE_CACHE=1 \
7673
--build-arg CLANG_VERSION=${CLANG_VERSION} \
7774
--build-arg CONAN_VERSION=${CONAN_VERSION} \
78-
--build-arg GITHUB_REPO=${GITHUB_REPO} \
7975
--build-arg NONROOT_USER=${NONROOT_USER} \
8076
--build-arg UBUNTU_VERSION=${UBUNTU_VERSION} \
8177
--tag ${CONTAINER_REGISTRY}/${CONTAINER_IMAGE}

0 commit comments

Comments
 (0)