doc: First draft of users and rights management #9
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: "PostGreSQL" | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- "postgresql/**" | |
pull_request: | |
paths: | |
- "postgresql/**" | |
jobs: | |
build: | |
if: "!startsWith(github.event.head_commit.message, '[skip ci] ')" | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: "Checking out" | |
uses: actions/checkout@v1 | |
- name: Getting image tag | |
id: version | |
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3) | |
- name: "Docker build database" | |
if: github.repository == 'georchestra/georchestra' | |
working-directory: postgresql/ | |
run: docker build -t georchestra/database:${{ steps.version.outputs.VERSION }} . | |
- name: "Logging in docker.io" | |
if: github.repository == 'georchestra/georchestra' && github.actor != 'dependabot[bot]' && github.event_name != 'pull_request' | |
uses: azure/docker-login@v1 | |
with: | |
username: '${{ secrets.DOCKER_HUB_USERNAME }}' | |
password: '${{ secrets.DOCKER_HUB_PASSWORD }}' | |
- 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/database | |
readme-filepath: ./postgresql/DOCKER_HUB.md | |
short-description: 'Database module for the geOrchestra SDI' | |
- 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 tag georchestra/database:${{ steps.version.outputs.VERSION }} georchestra/database:latest | |
docker push georchestra/database: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/database:${{ 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/database:${{ steps.version.outputs.VERSION }} |