Trigger Appflow Builds on a Schedule & On Click of a Button

I’m paying for Appflow Community, and trying to trigger a build from the main branch at the end of each work day, and at the click of a button for any necessary additional builds. I can’t find the ability anywhere.

  1. The only trigger I see on Automations is branch name
  2. When I do a New Build I have to select the commit, the target, Build stack/type, and when I do TestFlight to AppStore, I also need to select the destination. Far from a click to build situation.

My goal was to automate, but now I fear I need to create additional automations to control my Appflow automations.

What’s the easiest way to do this?

Thanks!

1 Like

I wound up creating a GitHub action, and I hope this helps someone else. I read a bunch of suggestions and came up with the following generic .github/workflows/automerge-appflow.yml which is scheduled, but can also be triggered manually:

name: Merge to Appflow
# Auto-merge the appflow branch with the main branch

permissions:
  contents: write # Needed for the final "git push" to work

on:
  workflow_dispatch:
  schedule:
    # 6pm EST Monday to Friday (11PM UTC days 1-5 of the week)
    - cron: '0 23 * * 1-5'

env:
  MY_BRANCH: appflow

  MAIN_BRANCH: main

jobs:
  merge:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4
      with:
        ref: ${{env.MY_BRANCH}}
    - name: Merge
      run: |
        git config user.name "Automerge Bot"
        git config user.email "gitbot@{mydomain.com}"
        git config pull.rebase false
        git pull origin ${{env.MAIN_BRANCH}}
    - name: Push
      run: git push