<commit_before>name: Release

on:
  release:
    types: [published]

jobs:
  docker-release:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Log in to registry
      run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
    - name: Login to Docker Hub
      uses: docker/login-action@v2
      with:
        username: ${{ secrets.DockerHubUsername }}
        password: ${{ secrets.DockerHubPassword }}
    - name: Pull built image
      run: docker pull ghcr.io/neinteractiveliterature/larp_library:${{ github.sha }}
    - name: Tag image with version Tag
      run: docker tag ghcr.io/neinteractiveliterature/larp_library:${{ github.sha }} neinteractiveliterature/larp_library:${{ github.event.release.name }}
    - name: Tag image as latest
      run: docker tag ghcr.io/neinteractiveliterature/larp_library:${{ github.sha }} neinteractiveliterature/larp_library:latest
    - name: Push to Docker Hub
      run: docker push neinteractiveliterature/larp_library:latest && docker push neinteractiveliterature/larp_library:${{ github.event.release.name }}
  heroku-release:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Install Heroku CLI
      run: curl https://cli-assets.heroku.com/install.sh | sh
    - name: Log in to registry
      run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
    - name: Pull built image
      run: docker pull ghcr.io/neinteractiveliterature/larp_library:${{ github.sha }}
    - name: Log into Heroku Container Registry
      env:
        HEROKU_API_KEY: ${{ secrets.HerokuApiToken }}
      run: heroku container:login
    - name: Tag production image as "web"
      run: docker tag ghcr.io/neinteractiveliterature/larp_library:${{ github.sha }} registry.heroku.com/${{ secrets.HerokuAppName }}/web
    - name: Push "web" image to Heroku Container Registry
      run: docker push registry.heroku.com/intercode/web
    - name: Release app to Heroku
      env:
        HEROKU_API_KEY: ${{ secrets.HerokuApiToken }}
      run: heroku container:release -a ${{ secrets.HerokuAppName }} web
  notify-slack:<commit_msg>Whoops, I missed an intercode<commit_after>name: Release

on:
  release:
    types: [published]

jobs:
  docker-release:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Log in to registry
      run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
    - name: Login to Docker Hub
      uses: docker/login-action@v2
      with:
        username: ${{ secrets.DockerHubUsername }}
        password: ${{ secrets.DockerHubPassword }}
    - name: Pull built image
      run: docker pull ghcr.io/neinteractiveliterature/larp_library:${{ github.sha }}
    - name: Tag image with version Tag
      run: docker tag ghcr.io/neinteractiveliterature/larp_library:${{ github.sha }} neinteractiveliterature/larp_library:${{ github.event.release.name }}
    - name: Tag image as latest
      run: docker tag ghcr.io/neinteractiveliterature/larp_library:${{ github.sha }} neinteractiveliterature/larp_library:latest
    - name: Push to Docker Hub
      run: docker push neinteractiveliterature/larp_library:latest && docker push neinteractiveliterature/larp_library:${{ github.event.release.name }}
  heroku-release:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Install Heroku CLI
      run: curl https://cli-assets.heroku.com/install.sh | sh
    - name: Log in to registry
      run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
    - name: Pull built image
      run: docker pull ghcr.io/neinteractiveliterature/larp_library:${{ github.sha }}
    - name: Log into Heroku Container Registry
      env:
        HEROKU_API_KEY: ${{ secrets.HerokuApiToken }}
      run: heroku container:login
    - name: Tag production image as "web"
      run: docker tag ghcr.io/neinteractiveliterature/larp_library:${{ github.sha }} registry.heroku.com/${{ secrets.HerokuAppName }}/web
    - name: Push "web" image to Heroku Container Registry
      run: docker push registry.heroku.com/${{ secrets.HerokuAppName }}/web
    - name: Release app to Heroku
      env:
        HEROKU_API_KEY: ${{ secrets.HerokuApiToken }}
      run: heroku container:release -a ${{ secrets.HerokuAppName }} web
  notify-slack:
{'fraction_non_alphanumeric': 0.11684234133213725, 'fraction_numerical': 0.0013455931823278763, 'mean_word_length': 3.191729323308271, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '216529', 'n_tokens_mistral': 1492, 'n_tokens_neox': 1387, 'n_words': 355}