doc: First draft of users and rights management #12
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
name: "geonetwork" | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- "commons/**" | |
- "security-proxy-spring-integration/**" | |
- "geonetwork" | |
- ".github/workflows/geonetwork.yml" | |
- "ldap-account-management/**" | |
- "console/**" | |
- "ldap/**" | |
pull_request: | |
paths: | |
- "commons/**" | |
- "security-proxy-spring-integration/**" | |
- "geonetwork" | |
- "ldap-account-management/**" | |
- "console/**" | |
- "ldap/**" | |
jobs: | |
build: | |
if: "!startsWith(github.event.head_commit.message, '[skip ci] ')" | |
runs-on: ubuntu-latest | |
timeout-minutes: 45 | |
steps: | |
- name: "Checking out" | |
uses: actions/checkout@v2 | |
- name: "Checking out submodules" | |
run: git submodule update --init --recursive --depth 1 geonetwork/ | |
- name: "Setting up Java" | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
- name: "Build Georchestra dependencies" | |
run: ./mvnw install -pl :security-proxy-spring-integration,testcontainers --also-make -P-all -T1C -ntp -B -Dfmt.action=validate -Dadditionalparam=-Xdoclint:none | |
# note "-pl :datafeeder --also-make" builds only the project and its dependencies | |
- name: "Build GeoNetwork" | |
working-directory: geonetwork/ | |
run: ../mvnw install -DskipTests -T1C -ntp -B -Dadditionalparam=-Xdoclint:none | |
- name: "Build required docker images (ldap, database)" | |
run: | | |
docker build -t georchestra/ldap:latest ./ldap | |
docker build -t georchestra/database:latest ./postgresql | |
- name: "Build required docker image (console)" | |
run: | | |
./mvnw -pl :console -am clean install docker:build -P-all,console,docker -DdockerImageName=georchestra/console:latest -DskipTests -ntp -Dskip.npm -Dfmt.skip | |
- name: "Run Georchestra Integration Tests" | |
working-directory: geonetwork/georchestra-integration/ | |
run: ../../mvnw verify -ntp -Dadditionalparam=-Xdoclint:none | |
- name: Getting image tag | |
if: github.repository == 'georchestra/georchestra' && github.actor != 'dependabot[bot]' | |
id: version | |
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3) | |
- name: "Build GeoNetwork docker image" | |
if: github.repository == 'georchestra/georchestra' && github.actor != 'dependabot[bot]' | |
run: | | |
cd geonetwork/web | |
../../mvnw package docker:build -Pdocker -DdockerImageName=georchestra/geonetwork -DdockerImageTags=${{ steps.version.outputs.VERSION }},latest -DskipTests -ntp | |
- name: "Logging in docker.io" | |
uses: azure/docker-login@v1 | |
if: github.repository == 'georchestra/georchestra' && github.actor != 'dependabot[bot]' && github.event_name != 'pull_request' | |
with: | |
username: '${{ secrets.DOCKER_HUB_USERNAME }}' | |
password: '${{ secrets.DOCKER_HUB_PASSWORD }}' | |
- name: "Pushing latest to docker.io" | |
if: github.ref == 'refs/heads/master' && github.repository == 'georchestra/georchestra' && github.actor != 'dependabot[bot]' && github.event_name != 'pull_request' | |
run: | | |
docker push georchestra/geonetwork:latest | |
- name: "Pushing release branch to docker.io" | |
if: contains(github.ref, 'refs/heads/24.') && github.repository == 'georchestra/georchestra' && github.actor != 'dependabot[bot]' && github.event_name != 'pull_request' | |
run: | | |
docker push georchestra/geonetwork:${{ steps.version.outputs.VERSION }} | |
- name: "Pushing release tag to docker.io" | |
if: contains(github.ref, 'refs/tags/24.') && github.repository == 'georchestra/georchestra' && github.actor != 'dependabot[bot]' && github.event_name != 'pull_request' | |
run: | | |
docker push georchestra/geonetwork:${{ steps.version.outputs.VERSION }} | |
- name: "Update Docker Hub Description" | |
if: github.ref == 'refs/heads/master' && github.repository == 'georchestra/georchestra' && github.actor != 'dependabot[bot]' && github.event_name != 'pull_request' | |
uses: peter-evans/dockerhub-description@v3 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
repository: georchestra/geonetwork | |
readme-filepath: ./geonetwork/DOCKER_HUB.md | |
short-description: 'Geonetwork module for the geOrchestra SDI' |