File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed
Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 6363 with :
6464 username : ${{ secrets.DOCKERHUB_USERNAME }}
6565 password : ${{ secrets.DOCKERHUB_TOKEN }}
66+ - uses : docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
67+ if : github.ref == 'refs/heads/main'
68+ with :
69+ registry : dhi.io
70+ username : ${{ secrets.DOCKERHUB_USERNAME }}
71+ password : ${{ secrets.DOCKERHUB_TOKEN }}
6672 - uses : docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
6773 id : build
6874 with :
98104 run : |
99105 set -euo pipefail
100106 IFS=$'\n\t'
101- VERSION="$(\grep "${IMAGE}/Dockerfile" -e '^FROM' | \head -n 1 | \sed -e 's/@.*$//; s/^.*://;')"
107+ VERSION="$(\grep "${IMAGE}/Dockerfile" -e '^FROM' | \head -n 1 | \sed -e 's/@.*$//; s/^.*://; s/-.*$//; ')"
102108 if [[ "${VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] ; then
103109 echo "VERSION=${VERSION}" >> "${GITHUB_ENV}"
104110 fi
Original file line number Diff line number Diff line change 5454 with :
5555 username : ${{ secrets.DOCKERHUB_USERNAME }}
5656 password : ${{ secrets.DOCKERHUB_TOKEN }}
57+ - uses : docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
58+ if : github.ref == 'refs/heads/main'
59+ with :
60+ registry : dhi.io
61+ username : ${{ secrets.DOCKERHUB_USERNAME }}
62+ password : ${{ secrets.DOCKERHUB_TOKEN }}
5763 - uses : docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
5864 id : build
5965 with :
Original file line number Diff line number Diff line change 1- FROM maven:3.9.12@sha256:800a33a4cb190082c47abcd57944c852e1dece834f92c0aef65bea6336c52a72
1+ FROM dhi.io/ maven:3.9.12-jdk25-debian13-dev @sha256:0a9d6751a403be81eeaed3b7107007d8f4d3e67bb251556f757857292cf78797
22
33HEALTHCHECK NONE
44
@@ -19,7 +19,7 @@ RUN mkdir -m 777 /opt/maven
1919ARG MAVEN_USER_HOME="/opt/maven/.m2"
2020ENV MAVEN_USER_HOME="${MAVEN_USER_HOME}"
2121
22- USER ubuntu
22+ USER nonroot
2323
2424WORKDIR /opt/project
2525
You can’t perform that action at this time.
0 commit comments