Skip to content

Commit

Permalink
Adding a github-action to build a docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
pmauduit committed Aug 22, 2024
1 parent 4ca54d9 commit 2bb3a80
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 16 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
@@ -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
21 changes: 5 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,6 @@
</dependency>
</dependencies>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>osgeo</id>
<name>Open Source Geospatial Foundation Repository</name>
<url>http://download.osgeo.org/webdav/geotools/</url>
</repository>
<repository>
<id>opengeo</id>
<name>OSGeo Release Repository</name>
Expand All @@ -227,14 +219,6 @@
<name>Jetty Maven2 Repository</name>
<url>https://oss.sonatype.org/content/groups/jetty/</url>
</repository>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray</id>
<name>bintray</name>
<url>http://dl.bintray.com/readytalk/maven</url>
</repository>
<repository>
<id>sonatype</id>
<name>Sonatype Repository</name>
Expand All @@ -250,6 +234,11 @@
<build>
<finalName>urbanisme</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.4.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down

0 comments on commit 2bb3a80

Please sign in to comment.