<commit_before>name: package

on: [push]

permissions:
  packages: write

jobs:
  ui:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Build development image
        run: |
          docker build -t alephdata/aleph-ui:${GITHUB_SHA} ui
          docker tag alephdata/aleph-ui:${GITHUB_SHA} alephdata/aleph-ui:latest
      - name: Build production image
        run: |
          docker build -t alephdata/aleph-ui-production:${GITHUB_SHA} -f ui/Dockerfile.production ui
      - name: Push docker image (hash)
        if: secrets.DOCKER_PASSWORD != null
        run: |
          echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USER }} --password-stdin 
          docker push alephdata/aleph-ui-production:${GITHUB_SHA}
      - name: Push docker image (tagged)
        if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
        run: |
          export ALEPH_TAG=${GITHUB_REF/refs\/tags\//}
          docker tag alephdata/aleph-ui-production:${GITHUB_SHA} alephdata/aleph-ui-production:${ALEPH_TAG};
          docker push alephdata/aleph-ui-production:${ALEPH_TAG};
          docker tag alephdata/aleph-ui-production:${GITHUB_SHA} alephdata/aleph-ui-production:latest;
          docker push alephdata/aleph-ui-production:latest;
  backend:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up
        run: |
          sudo sysctl -w vm.max_map_count=262144
          sudo echo "ALEPH_SECRET=batman\n" >> aleph.env
          echo "${GITHUB_REF}"
          docker --version
          docker-compose --version
      - name: Docker pull services
        run: |
          docker-compose pull --parallel --quiet elasticsearch convert-document ingest-file
          make ALEPH_TAG=${GITHUB_SHA} services
      - name: Build docker image
        run: |
          docker build -t alephdata/aleph:${GITHUB_SHA} .
      - name: Run aleph tests
        run: make ALEPH_TAG=${GITHUB_SHA} test
      - name: Push docker image (hash)
        if: secrets.DOCKER_PASSWORD != null
        run: |
          echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USER }} --password-stdin 
          docker push alephdata/aleph:${GITHUB_SHA}
      - name: Push docker images for tags
        if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
        run: |
          export ALEPH_TAG=${GITHUB_REF/refs\/tags\//}
          docker tag alephdata/aleph:${GITHUB_SHA} alephdata/aleph:${ALEPH_TAG};
          docker push alephdata/aleph:${ALEPH_TAG};
          docker tag alephdata/aleph:${GITHUB_SHA} alephdata/aleph:latest;
          docker push alephdata/aleph:latest;<commit_msg>try this build hack<commit_after>name: package

on: [push]

permissions:
  packages: write

jobs:
  ui:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Build development image
        run: |
          docker build -t alephdata/aleph-ui:${GITHUB_SHA} ui
          docker tag alephdata/aleph-ui:${GITHUB_SHA} alephdata/aleph-ui:latest
      - name: Build production image
        run: |
          docker build -t alephdata/aleph-ui-production:${GITHUB_SHA} -f ui/Dockerfile.production ui
      - name: Push docker image (hash)
        env:
          DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
        if: env.DOCKER_PASSWORD != null
        run: |
          echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USER }} --password-stdin 
          docker push alephdata/aleph-ui-production:${GITHUB_SHA}
      - name: Push docker image (tagged)
        if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
        run: |
          export ALEPH_TAG=${GITHUB_REF/refs\/tags\//}
          docker tag alephdata/aleph-ui-production:${GITHUB_SHA} alephdata/aleph-ui-production:${ALEPH_TAG};
          docker push alephdata/aleph-ui-production:${ALEPH_TAG};
          docker tag alephdata/aleph-ui-production:${GITHUB_SHA} alephdata/aleph-ui-production:latest;
          docker push alephdata/aleph-ui-production:latest;
  backend:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up
        run: |
          sudo sysctl -w vm.max_map_count=262144
          sudo echo "ALEPH_SECRET=batman\n" >> aleph.env
          echo "${GITHUB_REF}"
          docker --version
          docker-compose --version
      - name: Docker pull services
        run: |
          docker-compose pull --parallel --quiet elasticsearch convert-document ingest-file
          make ALEPH_TAG=${GITHUB_SHA} services
      - name: Build docker image
        run: |
          docker build -t alephdata/aleph:${GITHUB_SHA} .
      - name: Run aleph tests
        run: make ALEPH_TAG=${GITHUB_SHA} test
      - name: Push docker image (hash)
        env:
          DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
        if: env.DOCKER_PASSWORD != null
        run: |
          echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USER }} --password-stdin 
          docker push alephdata/aleph:${GITHUB_SHA}
      - name: Push docker images for tags
        if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
        run: |
          export ALEPH_TAG=${GITHUB_REF/refs\/tags\//}
          docker tag alephdata/aleph:${GITHUB_SHA} alephdata/aleph:${ALEPH_TAG};
          docker push alephdata/aleph:${ALEPH_TAG};
          docker tag alephdata/aleph:${GITHUB_SHA} alephdata/aleph:latest;
          docker push alephdata/aleph:latest;
{'fraction_non_alphanumeric': 0.11570247933884298, 'fraction_numerical': 0.002874595759971254, 'mean_word_length': 2.373939393939394, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2331035', 'n_tokens_mistral': 1912, 'n_tokens_neox': 1804, 'n_words': 386}