Skip to content

Commit

Permalink
ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
luizpais authored Jun 5, 2024
1 parent 65f1d66 commit b163c9f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,21 @@ jobs:
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml -DskipTests=true
- name: Extract version
id: get_version
run: |
echo "VERSION=$(grep -oPm1 "(?<=<version>)[^<]+" pom.xml)" >> $GITHUB_ENV
- name: Print version
run: echo "Version is $VERSION"
- name: Build Docker JVM
run: docker build -f src/main/docker/Dockerfile.jvm -t luizpais/sis-consulta-cadastro-jvm:0.1.0 .
run: docker build -f src/main/docker/Dockerfile.jvm -t luizpais/sis-consulta-cadastro-jvm:$VERSION .
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Deploy Image
run: docker image push luizpais/sis-consulta-cadastro-jvm:0.1.0
run: docker image push luizpais/sis-consulta-cadastro-jvm:$VERSION
- name: Docker Logout
run: docker logout

Expand Down

0 comments on commit b163c9f

Please sign in to comment.