Skip to content

Commit 3182e12

Browse files
committed
Pull REDHAT_USER from secrets, use CONTAINER_REGISTRY instead of GITHUB_REGISTRY
1 parent 488fb53 commit 3182e12

File tree

6 files changed

+34
-35
lines changed

6 files changed

+34
-35
lines changed

.github/workflows/debian.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- docker/debian/Dockerfile
88

99
env:
10-
GITHUB_REGISTRY: ghcr.io
10+
CONTAINER_REGISTRY: ghcr.io
1111
DOCKER_BUILDKIT: 1
1212
BUILDKIT_PROGRESS: plain
1313
CONAN_VERSION: 2.17.0
@@ -29,13 +29,13 @@ jobs:
2929
- name: Checkout repository
3030
uses: actions/checkout@v4
3131
- name: Login to GitHub Registry
32-
run: echo '${{ secrets.GITHUB_TOKEN }}' | docker login ${GITHUB_REGISTRY} -u '${{ github.repository_owner }}' --password-stdin
32+
run: echo '${{ secrets.GITHUB_TOKEN }}' | docker login ${CONTAINER_REGISTRY} -u '${{ github.repository_owner }}' --password-stdin
3333
- name: Determine the Docker image name.
3434
run: |
3535
# Convert the repository name to lowercase as the organization name is
3636
# uppercase, which is not permitted by the Docker registry.
3737
DOCKER_REPOSITORY=${GITHUB_REPOSITORY,,}
38-
echo "DOCKER_IMAGE=${GITHUB_REGISTRY}/${DOCKER_REPOSITORY}/debian-${{ matrix.version.os }}:gcc${{ matrix.version.gcc }}" >> $GITHUB_ENV
38+
echo "DOCKER_IMAGE=${CONTAINER_REGISTRY}/${DOCKER_REPOSITORY}/debian-${{ matrix.version.os }}:gcc${{ matrix.version.gcc }}" >> $GITHUB_ENV
3939
- name: Build the Docker image
4040
working-directory: docker/debian
4141
run: |
@@ -69,13 +69,13 @@ jobs:
6969
- name: Checkout repository
7070
uses: actions/checkout@v4
7171
- name: Login to GitHub Container Registry
72-
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ${GITHUB_REGISTRY} -u ${{ github.repository_owner }} --password-stdin
72+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ${CONTAINER_REGISTRY} -u ${{ github.repository_owner }} --password-stdin
7373
- name: Determine the Docker image name.
7474
run: |
7575
# Convert the repository name to lowercase as the organization name is
7676
# uppercase, which is not permitted by the Docker registry.
7777
DOCKER_REPOSITORY=${GITHUB_REPOSITORY,,}
78-
echo "DOCKER_IMAGE=${GITHUB_REGISTRY}/${DOCKER_REPOSITORY}/debian-${{ matrix.version.os }}:clang${{ matrix.version.clang }}" >> $GITHUB_ENV
78+
echo "DOCKER_IMAGE=${CONTAINER_REGISTRY}/${DOCKER_REPOSITORY}/debian-${{ matrix.version.os }}:clang${{ matrix.version.clang }}" >> $GITHUB_ENV
7979
- name: Build the Docker image
8080
working-directory: docker/debian
8181
run: |

.github/workflows/rhel.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ on:
77
- docker/rhel/Dockerfile
88

99
env:
10-
GITHUB_REGISTRY: ghcr.io
10+
CONTAINER_REGISTRY: ghcr.io
1111
REDHAT_REGISTRY: registry.redhat.io
12-
REDHAT_USER: 19221817|Docker
1312
DOCKER_BUILDKIT: 1
1413
BUILDKIT_PROGRESS: plain
1514
CONAN_VERSION: 2.17.0
@@ -30,15 +29,15 @@ jobs:
3029
- name: Checkout repository
3130
uses: actions/checkout@v4
3231
- name: Login to GitHub Registry
33-
run: echo '${{ secrets.GITHUB_TOKEN }}' | docker login ${GITHUB_REGISTRY} -u '${{ github.repository_owner }}' --password-stdin
32+
run: echo '${{ secrets.GITHUB_TOKEN }}' | docker login ${CONTAINER_REGISTRY} -u '${{ github.repository_owner }}' --password-stdin
3433
- name: Login to Red Hat Registry
35-
run: echo '${{ secrets.REDHAT_TOKEN }}' | docker login ${REDHAT_REGISTRY} -u '${{ env.REDHAT_USER }}' --password-stdin
34+
run: echo '${{ secrets.REDHAT_TOKEN }}' | docker login ${REDHAT_REGISTRY} -u '${{ secrets.REDHAT_USER }}' --password-stdin
3635
- name: Determine the Docker image name.
3736
run: |
3837
# Convert the repository name to lowercase as the organization name is
3938
# uppercase, which is not permitted by the Docker registry.
4039
DOCKER_REPOSITORY=${GITHUB_REPOSITORY,,}
41-
echo "DOCKER_IMAGE=${GITHUB_REGISTRY}/${DOCKER_REPOSITORY}/rhel-${{ matrix.version.os }}:gcc${{ matrix.version.gcc }}" >> $GITHUB_ENV
40+
echo "DOCKER_IMAGE=${CONTAINER_REGISTRY}/${DOCKER_REPOSITORY}/rhel-${{ matrix.version.os }}:gcc${{ matrix.version.gcc }}" >> $GITHUB_ENV
4241
- name: Build the Docker image
4342
working-directory: docker/rhel
4443
run: |
@@ -65,15 +64,15 @@ jobs:
6564
- name: Checkout repository
6665
uses: actions/checkout@v4
6766
- name: Login to GitHub Registry
68-
run: echo '${{ secrets.GITHUB_TOKEN }}' | docker login ${GITHUB_REGISTRY} -u '${{ github.repository_owner }}' --password-stdin
67+
run: echo '${{ secrets.GITHUB_TOKEN }}' | docker login ${CONTAINER_REGISTRY} -u '${{ github.repository_owner }}' --password-stdin
6968
- name: Login to Red Hat Registry
7069
run: echo '${{ secrets.REDHAT_TOKEN }}' | docker login ${REDHAT_REGISTRY} -u '${{ env.REDHAT_USER }}' --password-stdin
7170
- name: Determine the Docker image name.
7271
run: |
7372
# Convert the repository name to lowercase as the organization name is
7473
# uppercase, which is not permitted by the Docker registry.
7574
DOCKER_REPOSITORY=${GITHUB_REPOSITORY,,}
76-
echo "DOCKER_IMAGE=${GITHUB_REGISTRY}/${DOCKER_REPOSITORY}/rhel-${{ matrix.version.os }}:clang" >> $GITHUB_ENV
75+
echo "DOCKER_IMAGE=${CONTAINER_REGISTRY}/${DOCKER_REPOSITORY}/rhel-${{ matrix.version.os }}:clang" >> $GITHUB_ENV
7776
- name: Build the Docker image
7877
working-directory: docker/rhel
7978
run: |

.github/workflows/ubuntu.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- docker/ubuntu/Dockerfile
88

99
env:
10-
GITHUB_REGISTRY: ghcr.io
10+
CONTAINER_REGISTRY: ghcr.io
1111
DOCKER_BUILDKIT: 1
1212
BUILDKIT_PROGRESS: plain
1313
CONAN_VERSION: 2.17.0
@@ -30,13 +30,13 @@ jobs:
3030
- name: Checkout repository
3131
uses: actions/checkout@v4
3232
- name: Login to GitHub Registry
33-
run: echo '${{ secrets.GITHUB_TOKEN }}' | docker login ${GITHUB_REGISTRY} -u '${{ github.repository_owner }}' --password-stdin
33+
run: echo '${{ secrets.GITHUB_TOKEN }}' | docker login ${CONTAINER_REGISTRY} -u '${{ github.repository_owner }}' --password-stdin
3434
- name: Determine the Docker image name.
3535
run: |
3636
# Convert the repository name to lowercase as the organization name is
3737
# uppercase, which is not permitted by the Docker registry.
3838
DOCKER_REPOSITORY=${GITHUB_REPOSITORY,,}
39-
echo "DOCKER_IMAGE=${GITHUB_REGISTRY}/${DOCKER_REPOSITORY}/ubuntu-${{ matrix.version.os }}:gcc${{ matrix.version.gcc }}" >> $GITHUB_ENV
39+
echo "DOCKER_IMAGE=${CONTAINER_REGISTRY}/${DOCKER_REPOSITORY}/ubuntu-${{ matrix.version.os }}:gcc${{ matrix.version.gcc }}" >> $GITHUB_ENV
4040
- name: Build the Docker image
4141
working-directory: docker/ubuntu
4242
run: |
@@ -69,13 +69,13 @@ jobs:
6969
- name: Checkout repository
7070
uses: actions/checkout@v4
7171
- name: Login to GitHub Container Registry
72-
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ${GITHUB_REGISTRY} -u ${{ github.repository_owner }} --password-stdin
72+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ${CONTAINER_REGISTRY} -u ${{ github.repository_owner }} --password-stdin
7373
- name: Determine the Docker image name.
7474
run: |
7575
# Convert the repository name to lowercase as the organization name is
7676
# uppercase, which is not permitted by the Docker registry.
7777
DOCKER_REPOSITORY=${GITHUB_REPOSITORY,,}
78-
echo "DOCKER_IMAGE=${GITHUB_REGISTRY}/${DOCKER_REPOSITORY}/ubuntu-${{ matrix.version.os }}:clang${{ matrix.version.clang }}" >> $GITHUB_ENV
78+
echo "DOCKER_IMAGE=${CONTAINER_REGISTRY}/${DOCKER_REPOSITORY}/ubuntu-${{ matrix.version.os }}:clang${{ matrix.version.clang }}" >> $GITHUB_ENV
7979
- name: Build the Docker image
8080
working-directory: docker/ubuntu
8181
run: |

docker/debian/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ In summary, if you do not have a suitable personal access token, generate one
1515
[here](https://github.com/settings/tokens/new?scopes=write:packages).
1616

1717
```shell
18-
GITHUB_REGISTRY=ghcr.io
18+
CONTAINER_REGISTRY=ghcr.io
1919
GITHUB_USER=<your-github-username>
2020
GITHUB_TOKEN=<your-github-personal-access-token>
2121
echo ${GITHUB_TOKEN} | \
22-
docker login ${GITHUB_REGISTRY} -u "${GITHUB_USER}" --password-stdin
22+
docker login ${CONTAINER_REGISTRY} -u "${GITHUB_USER}" --password-stdin
2323
```
2424

2525
### Building and pushing the Docker image
@@ -48,7 +48,7 @@ DOCKER_BUILDKIT=1 BUILDKIT_PROGRESS=plain docker build . \
4848
--build-arg DEBIAN_VERSION=${DEBIAN_VERSION} \
4949
--build-arg GCC_VERSION=${GCC_VERSION} \
5050
--build-arg CONAN_VERSION=${CONAN_VERSION} \
51-
--tag ${GITHUB_REGISTRY}/${DOCKER_IMAGE} \
51+
--tag ${CONTAINER_REGISTRY}/${DOCKER_IMAGE} \
5252
--platform linux/amd64
5353
```
5454

@@ -69,7 +69,7 @@ DOCKER_BUILDKIT=1 BUILDKIT_PROGRESS=plain docker build . \
6969
--build-arg DEBIAN_VERSION=${DEBIAN_VERSION} \
7070
--build-arg CLANG_VERSION=${CLANG_VERSION} \
7171
--build-arg CONAN_VERSION=${CONAN_VERSION} \
72-
--tag ${GITHUB_REGISTRY}/${DOCKER_IMAGE} \
72+
--tag ${CONTAINER_REGISTRY}/${DOCKER_IMAGE} \
7373
--platform linux/amd64
7474
```
7575

@@ -80,7 +80,7 @@ can do so with the following command:
8080

8181
```shell
8282
CODEBASE=<path to the rippled repository>
83-
docker run --rm -it -v ${CODEBASE}:/rippled ${GITHUB_REGISTRY}/${DOCKER_IMAGE}
83+
docker run --rm -it -v ${CODEBASE}:/rippled ${CONTAINER_REGISTRY}/${DOCKER_IMAGE}
8484
```
8585

8686
Once inside the container you can run the following commands to build `rippled`:
@@ -111,5 +111,5 @@ If you want to push the image to the GitHub registry, you can do so with the
111111
following command:
112112
113113
```shell
114-
docker push ${GITHUB_REGISTRY}/${DOCKER_IMAGE}
114+
docker push ${CONTAINER_REGISTRY}/${DOCKER_IMAGE}
115115
```

docker/rhel/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ In summary, if you do not have a suitable personal access token, generate one
3434
[here](https://github.com/settings/tokens/new?scopes=write:packages).
3535

3636
```shell
37-
GITHUB_REGISTRY=ghcr.io
37+
CONTAINER_REGISTRY=ghcr.io
3838
GITHUB_USER=<your-github-username>
3939
GITHUB_TOKEN=<your-github-personal-access-token>
4040
echo ${GITHUB_TOKEN} | \
41-
docker login ${GITHUB_REGISTRY} -u "${GITHUB_USER}" --password-stdin
41+
docker login ${CONTAINER_REGISTRY} -u "${GITHUB_USER}" --password-stdin
4242
```
4343

4444
### Building and pushing the Docker image
@@ -67,7 +67,7 @@ DOCKER_BUILDKIT=1 BUILDKIT_PROGRESS=plain docker build . \
6767
--build-arg RHEL_VERSION=${RHEL_VERSION} \
6868
--build-arg GCC_VERSION=${GCC_VERSION} \
6969
--build-arg CONAN_VERSION=${CONAN_VERSION} \
70-
--tag ${GITHUB_REGISTRY}/${DOCKER_IMAGE} \
70+
--tag ${CONTAINER_REGISTRY}/${DOCKER_IMAGE} \
7171
--platform linux/amd64
7272
```
7373

@@ -86,7 +86,7 @@ DOCKER_BUILDKIT=1 BUILDKIT_PROGRESS=plain docker build . \
8686
--build-arg BUILDKIT_INLINE_CACHE=1 \
8787
--build-arg RHEL_VERSION=${RHEL_VERSION} \
8888
--build-arg CONAN_VERSION=${CONAN_VERSION} \
89-
--tag ${GITHUB_REGISTRY}/${DOCKER_IMAGE} \
89+
--tag ${CONTAINER_REGISTRY}/${DOCKER_IMAGE} \
9090
--platform linux/amd64
9191
```
9292

@@ -97,7 +97,7 @@ can do so with the following command:
9797

9898
```shell
9999
CODEBASE=<path to the rippled repository>
100-
docker run --rm -it -v ${CODEBASE}:/rippled ${GITHUB_REGISTRY}/${DOCKER_IMAGE}
100+
docker run --rm -it -v ${CODEBASE}:/rippled ${CONTAINER_REGISTRY}/${DOCKER_IMAGE}
101101
```
102102

103103
Once inside the container you can run the following commands to build `rippled`:
@@ -127,5 +127,5 @@ If you want to push the image to the GitHub registry, you can do so with the
127127
following command:
128128

129129
```shell
130-
docker push ${GITHUB_REGISTRY}/${DOCKER_IMAGE}
130+
docker push ${CONTAINER_REGISTRY}/${DOCKER_IMAGE}
131131
```

docker/ubuntu/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ In summary, if you do not have a suitable personal access token, generate one
1515
[here](https://github.com/settings/tokens/new?scopes=write:packages).
1616

1717
```shell
18-
GITHUB_REGISTRY=ghcr.io
18+
CONTAINER_REGISTRY=ghcr.io
1919
GITHUB_USER=<your-github-username>
2020
GITHUB_TOKEN=<your-github-personal-access-token>
2121
echo ${GITHUB_TOKEN} | \
22-
docker login ${GITHUB_REGISTRY} -u "${GITHUB_USER}" --password-stdin
22+
docker login ${CONTAINER_REGISTRY} -u "${GITHUB_USER}" --password-stdin
2323
```
2424

2525
### Building and pushing the Docker image
@@ -48,7 +48,7 @@ DOCKER_BUILDKIT=1 BUILDKIT_PROGRESS=plain docker build . \
4848
--build-arg UBUNTU_VERSION=${UBUNTU_VERSION} \
4949
--build-arg GCC_VERSION=${GCC_VERSION} \
5050
--build-arg CONAN_VERSION=${CONAN_VERSION} \
51-
--tag ${GITHUB_REGISTRY}/${DOCKER_IMAGE} \
51+
--tag ${CONTAINER_REGISTRY}/${DOCKER_IMAGE} \
5252
--platform linux/amd64
5353
```
5454

@@ -69,7 +69,7 @@ DOCKER_BUILDKIT=1 BUILDKIT_PROGRESS=plain docker build . \
6969
--build-arg UBUNTU_VERSION=${UBUNTU_VERSION} \
7070
--build-arg CLANG_VERSION=${CLANG_VERSION} \
7171
--build-arg CONAN_VERSION=${CONAN_VERSION} \
72-
--tag ${GITHUB_REGISTRY}/${DOCKER_IMAGE} \
72+
--tag ${CONTAINER_REGISTRY}/${DOCKER_IMAGE} \
7373
--platform linux/amd64
7474
```
7575

@@ -80,7 +80,7 @@ can do so with the following command:
8080

8181
```shell
8282
CODEBASE=<path to the rippled repository>
83-
docker run --rm -it -v ${CODEBASE}:/rippled ${GITHUB_REGISTRY}/${DOCKER_IMAGE}
83+
docker run --rm -it -v ${CODEBASE}:/rippled ${CONTAINER_REGISTRY}/${DOCKER_IMAGE}
8484
```
8585

8686
Once inside the container you can run the following commands to build `rippled`:
@@ -110,5 +110,5 @@ If you want to push the image to the GitHub registry, you can do so with the
110110
following command:
111111

112112
```shell
113-
docker push ${GITHUB_REGISTRY}/${DOCKER_IMAGE}
113+
docker push ${CONTAINER_REGISTRY}/${DOCKER_IMAGE}
114114
```

0 commit comments

Comments
 (0)