From 38079ce34c834f111f2af010f23762b148e8df7e Mon Sep 17 00:00:00 2001 From: Pierre Mauduit Date: Fri, 29 Mar 2024 17:20:47 +0100 Subject: [PATCH] Adding a gha to build a docker image --- .github/workflows/docker-build.yaml | 27 +++++++++++++++++++++++++++ pom.xml | 21 +++++---------------- 2 files changed, 32 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/docker-build.yaml diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml new file mode 100644 index 0000000..f89ca98 --- /dev/null +++ b/.github/workflows/docker-build.yaml @@ -0,0 +1,27 @@ +name: "builds a addon_urbanisme docker image" +on: + - push +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: "checking out" + uses: actions/checkout@v2 + + - name: "builds the docker image" + run: | + mvn clean package + cd target/docker/urbanisme && docker build -t sigrennesmetropole/addon_urbanisme:latest . + + - name: Setup Docker buildx + uses: docker/setup-buildx-action@v2 + + - name: Log in to docker-hub + uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_PASSWORD }} + + - name: "pushes the docker image" + run: | + docker push sigrennesmetropole/addon_urbanisme:latest diff --git a/pom.xml b/pom.xml index 8caf581..92a0a76 100644 --- a/pom.xml +++ b/pom.xml @@ -206,14 +206,6 @@ - - - false - - osgeo - Open Source Geospatial Foundation Repository - http://download.osgeo.org/webdav/geotools/ - opengeo OSGeo Release Repository @@ -227,14 +219,6 @@ Jetty Maven2 Repository https://oss.sonatype.org/content/groups/jetty/ - - - false - - bintray - bintray - http://dl.bintray.com/readytalk/maven - sonatype Sonatype Repository @@ -250,6 +234,11 @@ urbanisme + + org.apache.maven.plugins + maven-war-plugin + 3.4.0 + org.apache.maven.plugins maven-compiler-plugin