Skip to content

Commit

Permalink
Validate Java and Maven version
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Delporte committed Nov 16, 2024
1 parent a140aae commit 8b49a30
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci-develop-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ jobs:
- name: Get latest Docker image
run: docker pull pi4j/pi4j-builder:2.0
- name: Validating Java and Maven versions
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
run: |
echo "Java Version:"
docker run --rm pi4j/pi4j-builder:2.0 java -version
echo "Maven Version:"
docker run --rm pi4j/pi4j-builder:2.0 mvn -version
docker run --env MAVEN_USERNAME=$MAVEN_USERNAME --env MAVEN_PASSWORD=$MAVEN_PASSWORD --user "$(id -u):$(id -g)" --rm --volume $(pwd):/build pi4j/pi4j-builder:2.0 mvn -v
- name: Build entire Pi4J Project in Docker
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/ci-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ jobs:
- name: Get latest Docker image
run: docker pull pi4j/pi4j-builder:2.0
- name: Validating Java and Maven versions
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
run: |
echo "Java Version:"
docker run --rm pi4j/pi4j-builder:2.0 java -version
echo "Maven Version:"
docker run --rm pi4j/pi4j-builder:2.0 mvn -version
docker run --env MAVEN_USERNAME=$MAVEN_USERNAME --env MAVEN_PASSWORD=$MAVEN_PASSWORD --user "$(id -u):$(id -g)" --rm --volume $(pwd):/build pi4j/pi4j-builder:2.0 mvn -v
- name: Build entire Pi4J Project in Docker
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/ci-release-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ jobs:
- name: Get latest Docker image
run: docker pull pi4j/pi4j-builder:2.0
- name: Validating Java and Maven versions
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
run: |
echo "Java Version:"
docker run --rm pi4j/pi4j-builder:2.0 java -version
echo "Maven Version:"
docker run --rm pi4j/pi4j-builder:2.0 mvn -version
docker run --env MAVEN_USERNAME=$MAVEN_USERNAME --env MAVEN_PASSWORD=$MAVEN_PASSWORD --user "$(id -u):$(id -g)" --rm --volume $(pwd):/build pi4j/pi4j-builder:2.0 mvn -v
- name: Build entire Pi4J Project in Docker
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
Expand Down

0 comments on commit 8b49a30

Please sign in to comment.