release 23.0.4 #49
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
pull_request: | |
release: | |
jobs: | |
gn-cloud-ogc-api-records-service: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checking out" | |
uses: actions/checkout@v2 | |
- name: "Setting up Java" | |
uses: actions/setup-java@v3 | |
with: | |
distribution : 'temurin' | |
java-version : '11' | |
cache: 'maven' | |
- name: "Rebuild the dependencies" | |
run: ./mvnw clean install -P-docker -Dsearch_without_sql | |
- name: "Generate an artifact" | |
if: github.repository == 'georchestra/geonetwork-microservices' && github.ref == 'refs/heads/geor-main' | |
run: | | |
./mvnw --offline --no-transfer-progress -Dsearch_without_sql -B -f modules/services/ogc-api-records/ \ | |
clean package spring-boot:repackage | |
- name: "publish the jar" | |
if: github.repository == 'georchestra/geonetwork-microservices' && github.ref == 'refs/heads/geor-main' | |
uses: actions/upload-artifact@v1 | |
with: | |
name: gn-ogc-api-records.jar | |
path: modules/services/ogc-api-records/target/gn-ogc-api-records.jar | |
- name: Getting image tag | |
if: github.repository == 'georchestra/geonetwork-microservices' | |
id: version | |
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3) | |
- name: "Generate a docker image" | |
if : github.repository == 'georchestra/geonetwork-microservices' | |
run : docker build -f Dockerfile-ogc-api-records -t georchestra/gn-cloud-ogc-api-records-service:${{ steps.version.outputs.VERSION }} . | |
- name: "Login onto docker.io" | |
uses: azure/docker-login@v1 | |
if: github.repository == 'georchestra/geonetwork-microservices' && github.event_name == 'push' | |
with: | |
username: '${{ secrets.DOCKER_HUB_USERNAME }}' | |
password: '${{ secrets.DOCKER_HUB_PASSWORD }}' | |
- name: "publish latest docker image on docker-hub" | |
if: github.repository == 'georchestra/geonetwork-microservices' && github.ref == 'refs/heads/geor-main' | |
run: | | |
docker tag georchestra/gn-cloud-ogc-api-records-service:${{ steps.version.outputs.VERSION }} georchestra/gn-cloud-ogc-api-records-service:latest | |
docker push docker.io/georchestra/gn-cloud-ogc-api-records-service:latest | |
- name: "Pushing tag to docker.io" | |
if: contains(github.ref, 'refs/tags/') && github.repository == 'georchestra/geonetwork-microservices' && github.event_name == 'push' | |
run: | | |
docker push georchestra/gn-cloud-ogc-api-records-service:${{ steps.version.outputs.VERSION }} |