<commit_before>name: Publish Hove images on AWS

on:
  workflow_dispatch:
    inputs:
      environment:
        description: 'Environment'
        type: choice
        options:
          - dev
          - release
        required: true
      tag:
        description: 'Tag of the image'
        type: string
        default: 'dev'
        required: true

  workflow_run:
    workflows: ["Build Navitia Packages For Release", "Build Navitia Packages For Dev Multi Distributions"]
    branches: [release, dev]
    types:
      - completed

jobs:
  publish_on_aws:
    runs-on: ubuntu-latest
    outputs:
      branch: ${{ steps.init_variables.outputs.branch }}
      tag: ${{ steps.init_variables.outputs.tag }}
    steps:
      - id: init_variables
        run: |
          if [[ '${{ github.event_name }}' == 'repository_dispatch' ]]
          then
            echo "Workflow triggered due to finished upstream workflow"
            echo "::set-output name=branch::${{ github.event.workflow_run.head_branch }}"
            if [[ '${{ github.event.workflow_run.head_branch }}' == 'dev' ]]
            then
              echo "::set-output name=tag::dev"
            else :
              echo "Realease branch, collecting last version"
              VERSION=$(curl https://api.github.com/repos/hove-io/navitia/tags | jq '.[0].name')
              echo "::set-output name=tag::$VERSION"
            fi
          elif [[ '${{ github.event_name }}' == 'workflow_dispatch' ]]
          then
            echo "Workflow triggered manually"
            echo "::set-output name=branch::${{ github.event.inputs.environment }}"
            echo "::set-output name=tag::${{ github.event.inputs.tag }}"
          else :
            exit 1
          fi

      - name: Generate token
        id: app-token
        uses: getsentry/action-github-app-token@v1
        with:
          app_id: ${{ secrets.AWS_TERRAFORM_WORKFLOW_APP_ID }}
          private_key: ${{ secrets.AWS_TERRAFORM_WORKFLOW_APP_PEM_KEY }}<commit_msg>fix: use new secrets for aws worflow trigger<commit_after>name: Publish Hove images on AWS

on:
  workflow_dispatch:
    inputs:
      environment:
        description: 'Environment'
        type: choice
        options:
          - dev
          - release
        required: true
      tag:
        description: 'Tag of the image'
        type: string
        default: 'dev'
        required: true

  workflow_run:
    workflows: ["Build Navitia Packages For Release", "Build Navitia Packages For Dev Multi Distributions"]
    branches: [release, dev]
    types:
      - completed

jobs:
  publish_on_aws:
    runs-on: ubuntu-latest
    outputs:
      branch: ${{ steps.init_variables.outputs.branch }}
      tag: ${{ steps.init_variables.outputs.tag }}
    steps:
      - id: init_variables
        run: |
          if [[ '${{ github.event_name }}' == 'workflow_run' ]]
          then
            echo "Workflow triggered due to finished upstream workflow"
            echo "::set-output name=branch::${{ github.event.workflow_run.head_branch }}"
            if [[ '${{ github.event.workflow_run.head_branch }}' == 'dev' ]]
            then
              echo "::set-output name=tag::dev"
            else :
              echo "Realease branch, collecting last version"
              VERSION=$(curl https://api.github.com/repos/hove-io/navitia/tags | jq '.[0].name')
              echo "::set-output name=tag::$VERSION"
            fi
          elif [[ '${{ github.event_name }}' == 'workflow_dispatch' ]]
          then
            echo "Workflow triggered manually"
            echo "::set-output name=branch::${{ github.event.inputs.environment }}"
            echo "::set-output name=tag::${{ github.event.inputs.tag }}"
          else :
            exit 1
          fi

      - name: Generate token
        id: app-token
        uses: getsentry/action-github-app-token@v1
        with:
          app_id: ${{ secrets.GA_OS_WORKFLOW_TRIGGER_APP_ID }}
          private_key: ${{ secrets.GA_OS_WORKFLOW_TRIGGER_APP_PEM }}
{'fraction_non_alphanumeric': 0.11897665176353701, 'fraction_numerical': 0.0014903129657228018, 'mean_word_length': 1.9918276374442794, 'pattern_counts': {'":': 10, '<': 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': '665297', 'n_tokens_mistral': 1207, 'n_tokens_neox': 1165, 'n_words': 273}