<commit_before>
name: Build

on:
  push:
  pull_request:

env:
  IMAGE_NAME: spacex-api

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: '12.x'
      - run: npm install
      - run: npm test

  push:
    needs: test
    runs-on: ubuntu-latest

    # Only run on master pushes
    if: github.event_name == 'push' && github.ref == 'master'

    steps:
      - uses: actions/checkout@v2

      - name: Build image
        run: docker build . --file Dockerfile --tag image

      - name: Log into registry
        run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin

      - name: Push image<commit_msg>add condition to run docker publish on tagged commits<commit_after>
name: Build

on:
  push:
  pull_request:

env:
  IMAGE_NAME: spacex-api

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: '12.x'
      - run: npm install
      - run: npm test

  push:
    needs: test
    runs-on: ubuntu-latest

    # Only run on master or tagged pushes
    if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/tags/*')

    steps:
      - uses: actions/checkout@v2

      - name: Build image
        run: docker build . --file Dockerfile --tag image

      - name: Log into registry
        run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin

      - name: Push image
{'fraction_non_alphanumeric': 0.12264723740133576, 'fraction_numerical': 0.006071645415907711, 'mean_word_length': 2.139047619047619, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2731141', 'n_tokens_mistral': 588, 'n_tokens_neox': 536, 'n_words': 153}