name: Build and Release Workflow
on: [push]

jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v1
      - name: Set up Java
        uses: actions/setup-java@v1
        with:
          java-version: 8
      - name: Compilation
        uses: eskatos/gradle-command-action@v1
        with:
          arguments: classes
      - name: Unit tests
        uses: eskatos/gradle-command-action@v1
        with:
          arguments: test
      - name: Integration tests
        uses: eskatos/gradle-command-action@v1
        with:
          arguments: integrationTest
      - name: Functional tests
        uses: eskatos/gradle-command-action@v1
        with:
          arguments: functionalTest
      - name: Documentation tests
        uses: eskatos/gradle-command-action@v1
        with:
          arguments: docTest
      - name: Release
        if: startsWith(github.ref, 'refs/tags/v')
        uses: eskatos/gradle-command-action@v1
        with:
          arguments: assemble bintrayUpload gitPublishPush -Dorg.ajoberstar.grgit.auth.username=${{ secrets.GITHUB_TOKEN }} -s
name: Build and Release Workflow
on: [push]

jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v1
      - name: Set up Java
        uses: actions/setup-java@v1
        with:
          java-version: 8
      - name: Set up Docker private registry
        run: |
          docker run -d -p 5000:5000 --restart=always --name registry registry:2
          docker run -d -p 5001:5000 --restart=always --name secure_registry -v "$(pwd)"/src/functTest/resources/auth:/auth:rw -e "REGISTRY_AUTH=htpasswd" -e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm" -e "REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd" registry:2
      - name: Compilation
        uses: eskatos/gradle-command-action@v1
        with:
          arguments: classes
      - name: Unit tests
        uses: eskatos/gradle-command-action@v1
        with:
          arguments: test
      - name: Integration tests
        uses: eskatos/gradle-command-action@v1
        with:
          arguments: integrationTest
      - name: Functional tests
        uses: eskatos/gradle-command-action@v1
        with:
          arguments: functionalTest
      - name: Documentation tests
        uses: eskatos/gradle-command-action@v1
        with:
          arguments: docTest
      - name: Release
        if: startsWith(github.ref, 'refs/tags/v')
        uses: eskatos/gradle-command-action@v1
        with:
          arguments: assemble bintrayUpload gitPublishPush -Dorg.ajoberstar.grgit.auth.username=${{ secrets.GITHUB_TOKEN }} -s
Set up Docker private registry
Set up Docker private registry
