Why duplicated builds from a single push to GH

When I push changes to my GitHub PR, which has GitHubActions set to trigger EAS builds, sometimes I see duplicated builds with the development-internal profile.

I can see it’s the same commit hash:

We are on:

  • Managed Workflow
  • eas-cli version: eas-version: latest
  • expo SDK46

Here is the eas.config:

{
  "build": {
    "staging": {
      "node": "16.15.0",
      "yarn": "1.22.5",
      "env": {
        "API_ADDRESS": "ourURL",
        "LOG_API_ERRORS": "true",
        "GOOGLE_PLACES_API_KEY": "ourKey"
      },
      "ios": {
        "env": {
          "PLATFORM": "ios"
        }
      }
    },
    "prod": {
      "node": "16.15.0",
      "yarn": "1.22.5",
     "env": {
        "API_ADDRESS": "ourURL",
        "LOG_API_ERRORS": "true",
        "GOOGLE_PLACES_API_KEY": "ourKey"
      },
      "ios": {
        "env": {
          "PLATFORM": "ios"
        }
      }
    },
    "release": {},
    "prod-internal": {
      "extends": "prod",
      "releaseChannel": "prod-internal",
      "distribution": "internal"
    },
    "development-internal": {
      "extends": "staging",
      "distribution": "internal"
    },
    "development-simulator": {
      "extends": "prod",
      "ios": {
        "releaseChannel": "development-simulator",
        "simulator": true
      }
    },
    "development": {
      "extends": "staging",
      "developmentClient": true,
      "distribution": "internal",
      "ios": {
        "simulator": true
      }
    }
  }
}

and our GitHub workflow ci.yml:

name: CI
on:
  workflow_dispatch:
  pull_request:
    types: [labeled, opened, synchronize]
    branches:
      - develop
jobs:
  typescript:
    name: Compile Typescript
    runs-on: ubuntu-latest

    steps:
      - name: Checkout GitHub Repo
        uses: actions/checkout@v3

      - name: Set Up Node.js
        uses: actions/setup-node@v3
        with:
          node-version: 16
          cache: yarn
          registry-url: https://registry.npmjs.org

      - name: Install Deps
        run: yarn install --frozen-lockfile
        env:
          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

      - name: Validate TypeScript
        run: yarn tsc

  lint:
    name: Lint code
    runs-on: ubuntu-latest

    steps:
      - name: Check out Git repository
        uses: actions/checkout@v3

      - name: Set up Node.js
        uses: actions/setup-node@v3
        with:
          node-version: 16
          registry-url: https://registry.npmjs.org/

      - name: Install deps
        run: yarn install --frozen-lockfile
        env:
          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

      - name: Validate Lint
        run: yarn lint

  jest:
    name: Run unit tests
    runs-on: ubuntu-latest

    steps:
      - name: Check out Git repository
        uses: actions/checkout@v3

      - name: Set up Node.js
        uses: actions/setup-node@v3
        with:
          node-version: 16
          registry-url: https://registry.npmjs.org/

      - name: Install deps
        run: yarn install --frozen-lockfile
        env:
          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

      - name: Validate Unit Tests
        run: yarn test

  build_ios:
    name: Build IPA file on EAS
    if: ${{ contains(github.event.pull_request.labels.*.name, 'ready for review') }}
    needs:
      - typescript
      - lint
      - jest
    runs-on: ubuntu-latest
    outputs:
      id: ${{ steps.iosBuild.outputs.id }}
      url: ${{ steps.iosBuild.outputs.url }}
    steps:
      - name: 🏗 Setup repo
        uses: actions/checkout@v3

      - name: 🏗 Setup node
        uses: actions/setup-node@v3
        with:
          node-version: 16
          cache: yarn
          registry-url: https://registry.npmjs.org/

      - name: 🏗 Setup Expo and EAS
        uses: expo/expo-github-action@v7
        with:
          expo-version: 5.x
          eas-version: latest
          token: ${{ secrets.EXPO_TOKEN }}

      - name: 📦 Install dependencies
        run: yarn install --frozen-lockfile
        env:
          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

      - name: 🛠 Build IPA
        id: iosBuild
        run: |
          eas build --platform ios --non-interactive --profile development-internal --json > build_ios.json
          echo "::set-output name=id::$(jq '.[] .id' build_ios.json -r)"
          echo "::set-output name=url::$(jq '.[] .artifacts.buildUrl' build_ios.json -r)"

  pr_comment:
    if: ${{ contains(github.event.pull_request.labels.*.name, 'ready for review') }}
    needs:
      - build_ios
    runs-on: ubuntu-latest
    steps:
      - name: Comment PR
        uses: unsplash/comment-on-pr@v1.3.0
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          msg: |
            Build successfully created. Here are the URLs:
            - 🍎 iOS Build URL - https://expo.dev/accounts/fluidtruck/projects/delta/builds/${{ needs.build_ios.outputs.id }}
          check_for_duplicate_msg: false
          delete_prev_regex_msg: "Build successfully created. Here are the URLs"

is there something wrong with the EAS.config?