Skip to content

Commit

Permalink
Update maven.yaml
Browse files Browse the repository at this point in the history
Add build & push docker image steps in the GHA
  • Loading branch information
pmauduit authored Nov 2, 2023
1 parent 847ef69 commit 97881ce
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/maven.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,24 @@ jobs:
distribution: 'temurin'
cache: maven

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: latest

- name: Build with Maven
run: mvn -B verify --file pom.xml

- name: Build a docker image
run: mvn clean package -Pdocker

- name: Login to DockerHub
if: github.repository == 'camptocamp/mel-data-api' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/main'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: push the docker image
if: github.repository == 'camptocamp/mel-data-api' && github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/main'
run: docker push camptocamp/opendata-ogc-features:latest

0 comments on commit 97881ce

Please sign in to comment.