Skip to content

Commit

Permalink
pass docker credentials from environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-gilber committed Oct 28, 2023
1 parent 6339e5b commit 834ebb4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
run: |
mvn clean package \
-Ddocker.registry.url= ${{ env.DOCKER_REGISTRY_URL }} \
-Ddocker.registry.username= ${{ env.DOCKER_REGISTRY_USERNAME }} \
-Ddocker.registry.password= ${{ env.DOCKER_REGISTRY_PASSWORD }}
-DDOCKER_REGISTRY_URL=${{ env.DOCKER_REGISTRY_URL }} \
-DDOCKER_REGISTRY_USERNAME=${{ env.DOCKER_REGISTRY_USERNAME }} \
-DDOCKER_REGISTRY_PASSWORD=${{ env.DOCKER_REGISTRY_PASSWORD }}
# Uncomment lines below to build with Docker
# - name: Set up QEMU
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
<mysql-connector-java-version>8.0.33</mysql-connector-java-version>
<!-- Dockerfile Build Plugin: https://github.com/spotify/dockerfile-maven -->
<dockerfile-maven-version>1.4.13</dockerfile-maven-version>
<docker.registry.url></docker.registry.url>
<docker.registry.username></docker.registry.username>
<docker.registry.password></docker.registry.password>
<docker.registry.url>${DOCKER_REGISTRY_URL}</docker.registry.url> <!-- Command Line Arguments as Maven Properties: https://www.baeldung.com/maven-arguments -->
<docker.registry.username>${DOCKER_REGISTRY_USERNAME}</docker.registry.username> <!-- Command Line Arguments as Maven Properties: https://www.baeldung.com/maven-arguments -->
<docker.registry.password>${DOCKER_REGISTRY_PASSWORD}</docker.registry.password> <!-- Command Line Arguments as Maven Properties: https://www.baeldung.com/maven-arguments -->
</properties>
<dependencies>
<!-- Added by Paul Gilber (Start) -->
Expand Down

0 comments on commit 834ebb4

Please sign in to comment.