<commit_before>name: basket-api

on:
  push:
    branches:
    - master
    - dev
    - feature/github-actions
    paths:
    - src/BuildingBlocks/*
    - src/Services/Basket/*
    - .github/workflows/basket-api.yml
env:
  registryEndpoint: hub.docker.com/repository/docker/borjasanes/eshoponcontainers
  services: basket-api
  image: basket.api
  # branch: $(echo ${GITHUB_REF#refs/heads/})

jobs:
  BuildContainersForPR_Linux:
    runs-on: ubuntu-16.04
    if: ${{ github.event_name == 'pull_request' }}
    steps:
    - name: Compose build ${{ env.services  }}
      run: docker-compose build -f src/docker-compose.yml ${{ env.services  }}
      shell: bash
      env:
        TAG: ${{ env.branch }}
        REGISTRY: ${{ env.registryEndpoint }}
  BuildContainersForPR_Windows:
    runs-on: windows-2019
    if:  ${{ false }}
    # if: ${{ github.event_name == 'pull_request' }}
    steps:
    - name: Compose build ${{ env.services  }}
      run: docker-compose build -f src/docker-compose.yml ${{ env.services  }}
      shell: pwsh
      env:
        TAG: ${{ env.branch }}
        REGISTRY: ${{ env.registryEndpoint }}
        PLATFORM: win
        NODE_IMAGE: stefanscherer/node-windows:10
  BuildLinux:
    runs-on: ubuntu-latest
    if: ${{ github.event_name != 'pull_request' }}
    steps:
    - name: 'Checkout Github Action'
      uses: actions/checkout@master

    - name: Login to Container Registry
      uses: docker/login-action@v1
      with:
        registry: 
        username: ${{ secrets.USERNAME }}
        password: ${{ secrets.PASSWORD }}

    - name: Get branch name
      run: |
        currentbranch=$(echo ${GITHUB_REF##*/})
        echo "running on $currentbranch"
        echo "branch=$currentbranch" >> $GITHUB_ENV
        echo "TAG=$currentbranch" >> $GITHUB_ENV
      shell: bash

    - name: Compose build ${{ env.services }}
      run: |
        sudo -E docker-compose build ${{ env.services }}
        docker images
      working-directory: ./src
      shell: bash
      env:
      #   TAG: ${{ env.branch }}
        REGISTRY: ${{ env.registryEndpoint }}

    - name: Compose push ${{ env.image  }}
      run: sudo -E docker-compose -f src/docker-compose.yml push ${{ env.services }}
      working-directory: ./src
      shell: bash

  BuildWindows:
    runs-on: windows-2019
    if:  ${{ false }}
    # if: ${{ github.event_name != 'pull_request' }}
    steps:
    - name: Compose build ${{ env.services  }}
      run: docker-compose build -f src/docker-compose.yml ${{ env.services  }}
      shell: pwsh
      env:
        TAG: ${{ env.branch }}
        REGISTRY: ${{ env.registryEndpoint }}
    - name: Compose push ${{ env.image  }}
      run: docker-compose push -f src/docker-compose.yml ${{ env.services }}'
      shell: pwsh
      env:
        TAG: ${{ env.branch }}
        REGISTRY: ${{ env.registryEndpoint }}<commit_msg>Fix docker-file path for push step.<commit_after>name: basket-api

on:
  push:
    branches:
    - master
    - dev
    - feature/github-actions
    paths:
    - src/BuildingBlocks/*
    - src/Services/Basket/*
    - .github/workflows/basket-api.yml
env:
  registryEndpoint: hub.docker.com/repository/docker/borjasanes/eshoponcontainers
  services: basket-api
  image: basket.api
  # branch: $(echo ${GITHUB_REF#refs/heads/})

jobs:
  BuildContainersForPR_Linux:
    runs-on: ubuntu-16.04
    if: ${{ github.event_name == 'pull_request' }}
    steps:
    - name: Compose build ${{ env.services  }}
      run: docker-compose build -f src/docker-compose.yml ${{ env.services  }}
      shell: bash
      env:
        TAG: ${{ env.branch }}
        REGISTRY: ${{ env.registryEndpoint }}
  BuildContainersForPR_Windows:
    runs-on: windows-2019
    if:  ${{ false }}
    # if: ${{ github.event_name == 'pull_request' }}
    steps:
    - name: Compose build ${{ env.services  }}
      run: docker-compose build -f src/docker-compose.yml ${{ env.services  }}
      shell: pwsh
      env:
        TAG: ${{ env.branch }}
        REGISTRY: ${{ env.registryEndpoint }}
        PLATFORM: win
        NODE_IMAGE: stefanscherer/node-windows:10
  BuildLinux:
    runs-on: ubuntu-latest
    if: ${{ github.event_name != 'pull_request' }}
    steps:
    - name: 'Checkout Github Action'
      uses: actions/checkout@master

    - name: Login to Container Registry
      uses: docker/login-action@v1
      with:
        registry: 
        username: ${{ secrets.USERNAME }}
        password: ${{ <PASSWORD>.PASSWORD }}

    - name: Get branch name
      run: |
        currentbranch=$(echo ${GITHUB_REF##*/})
        echo "running on $currentbranch"
        echo "branch=$currentbranch" >> $GITHUB_ENV
        echo "TAG=$currentbranch" >> $GITHUB_ENV
      shell: bash

    - name: Compose build ${{ env.services }}
      run: |
        sudo -E docker-compose build ${{ env.services }}
        docker images
      working-directory: ./src
      shell: bash
      env:
      #   TAG: ${{ env.branch }}
        REGISTRY: ${{ env.registryEndpoint }}

    - name: Compose push ${{ env.image  }}
      run: sudo -E docker-compose push ${{ env.services }}
      working-directory: ./src
      shell: bash

  BuildWindows:
    runs-on: windows-2019
    if:  ${{ false }}
    # if: ${{ github.event_name != 'pull_request' }}
    steps:
    - name: Compose build ${{ env.services  }}
      run: docker-compose build -f src/docker-compose.yml ${{ env.services  }}
      shell: pwsh
      env:
        TAG: ${{ env.branch }}
        REGISTRY: ${{ env.registryEndpoint }}
    - name: Compose push ${{ env.image  }}
      run: docker-compose push -f src/docker-compose.yml ${{ env.services }}'
      shell: pwsh
      env:
        TAG: ${{ env.branch }}
        REGISTRY: ${{ env.registryEndpoint }}
{'fraction_non_alphanumeric': 0.14258323165417466, 'fraction_numerical': 0.005229213874847481, 'mean_word_length': 2.2751141552511416, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4531303', 'n_tokens_mistral': 1985, 'n_tokens_neox': 1807, 'n_words': 407}