Skip to content

Commit c909bcc

Browse files
committed
refactor: replace inline Docker login command with docker/login-action for improved readability and maintainability
1 parent 9b5a468 commit c909bcc

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/continuous-integration-workflow.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ jobs:
1515
uses: actions/checkout@v4.2.2
1616
-
1717
name: Login to Red Hat Registry
18-
run: |
19-
echo "${{ secrets.REDHAT_REGISTRY_PASSWORD }}" | docker login -u ${{ secrets.REDHAT_REGISTRY_USERNAME }} --password-stdin registry.redhat.io
18+
uses: docker/login-action@v3
19+
with:
20+
registry: registry.redhat.io
21+
username: ${{ secrets.REDHAT_REGISTRY_USERNAME }}
22+
password: ${{ secrets.REDHAT_REGISTRY_PASSWORD }}
2023
-
2124
name: Build UBI9 docker image
2225
run: |
@@ -34,8 +37,11 @@ jobs:
3437
uses: actions/checkout@v4.2.2
3538
-
3639
name: Login to Red Hat Registry
37-
run: |
38-
echo "${{ secrets.REDHAT_REGISTRY_PASSWORD }}" | docker login -u ${{ secrets.REDHAT_REGISTRY_USERNAME }} --password-stdin registry.redhat.io
40+
uses: docker/login-action@v3
41+
with:
42+
registry: registry.redhat.io
43+
username: ${{ secrets.REDHAT_REGISTRY_USERNAME }}
44+
password: ${{ secrets.REDHAT_REGISTRY_PASSWORD }}
3945
- name: Build UBI9 docker image
4046
run: |
4147
./.github/workflows/build-docker-image.sh \

0 commit comments

Comments
 (0)