From e1e3a9e811980b0666f9e38c37f6b8d8d7ca7024 Mon Sep 17 00:00:00 2001 From: daghaian <16483722+daghaian@users.noreply.github.com> Date: Wed, 24 Jun 2026 11:26:40 -0700 Subject: [PATCH 1/4] feat: Adds autobuild trigger workflow to avoid the auto-disabling on existing build --- .github/workflows/build_loop.yml | 6 +----- .github/workflows/trigger_build.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/trigger_build.yml diff --git a/.github/workflows/build_loop.yml b/.github/workflows/build_loop.yml index 52c00dedb..63284becc 100644 --- a/.github/workflows/build_loop.yml +++ b/.github/workflows/build_loop.yml @@ -1,11 +1,7 @@ -name: 4. Build Loop +name: 5. Build Loop run-name: Build Loop (${{ github.ref_name }}) on: workflow_dispatch: - schedule: - # Check for updates every Sunday - # Later logic builds if there are updates or if it is the 2nd Sunday of the month - - cron: "33 7 * * 0" # Sunday at UTC 7:33 env: GH_PAT: ${{ secrets.GH_PAT }} diff --git a/.github/workflows/trigger_build.yml b/.github/workflows/trigger_build.yml new file mode 100644 index 000000000..7af0a7e31 --- /dev/null +++ b/.github/workflows/trigger_build.yml @@ -0,0 +1,26 @@ +name: 4. Trigger Build Loop +run-name: Trigger Build Loop (${{ github.ref_name }}) +on: + workflow_dispatch: + schedule: + - cron: "33 7 * * 0" # Sunday at UTC 7:33 + +jobs: + trigger: + runs-on: ubuntu-latest + steps: + - name: Trigger target workflow + env: + GH_PAT: ${{ secrets.GH_PAT }} + run: | + curl --fail -X PUT \ + -H "Authorization: Bearer ${GH_PAT}" \ + -H "Accept: application/vnd.github+json" \ + https://api.github.com/repos/${{ github.repository }}/actions/workflows/build_loop.yml/enable + + + curl --fail -X POST \ + -H "Authorization: Bearer ${GH_PAT}" \ + -H "Accept: application/vnd.github+json" \ + https://api.github.com/repos/${{ github.repository }}/actions/workflows/build_loop.yml/dispatches \ + -d '{"ref":"${{ github.ref_name }}"}' From a927928edb7339bc2c696c2817b2f9325c959d46 Mon Sep 17 00:00:00 2001 From: daghaian <16483722+daghaian@users.noreply.github.com> Date: Fri, 26 Jun 2026 15:03:12 -0700 Subject: [PATCH 2/4] fix: Pass input on dispatch indicating when the workflow has been triggered by the newly added trigger workflow instead of manually --- .github/workflows/build_loop.yml | 12 +++++++++--- .github/workflows/trigger_build.yml | 5 ++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_loop.yml b/.github/workflows/build_loop.yml index 63284becc..9c9fdbfa7 100644 --- a/.github/workflows/build_loop.yml +++ b/.github/workflows/build_loop.yml @@ -1,7 +1,13 @@ -name: 5. Build Loop +name: Triggered Loop Build run-name: Build Loop (${{ github.ref_name }}) on: workflow_dispatch: + inputs: + is_scheduled: + description: 'Whether this was dispatched from the trigger scheduled workflow' + required: false + type: boolean + default: false env: GH_PAT: ${{ secrets.GH_PAT }} @@ -153,7 +159,7 @@ jobs: uses: ./.github/workflows/create_certs.yml secrets: inherit if: | - github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_dispatch' && github.event.inputs.is_scheduled != 'true') || (vars.SCHEDULED_BUILD != 'false' && needs.check_status.outputs.IS_SECOND_IN_MONTH == 'true') || (vars.SCHEDULED_SYNC != 'false' && needs.check_status.outputs.NEW_COMMITS == 'true' ) @@ -166,7 +172,7 @@ jobs: contents: write if: | # builds with manual start; if scheduled: once a month or when new commits are found - github.event_name == 'workflow_dispatch' || + (github.event_name == 'workflow_dispatch' && github.event.inputs.is_scheduled != 'true') || (vars.SCHEDULED_BUILD != 'false' && needs.check_status.outputs.IS_SECOND_IN_MONTH == 'true') || (vars.SCHEDULED_SYNC != 'false' && needs.check_status.outputs.NEW_COMMITS == 'true' ) steps: diff --git a/.github/workflows/trigger_build.yml b/.github/workflows/trigger_build.yml index 7af0a7e31..5b5f6865b 100644 --- a/.github/workflows/trigger_build.yml +++ b/.github/workflows/trigger_build.yml @@ -1,4 +1,4 @@ -name: 4. Trigger Build Loop +name: 4. Build Loop run-name: Trigger Build Loop (${{ github.ref_name }}) on: workflow_dispatch: @@ -18,9 +18,8 @@ jobs: -H "Accept: application/vnd.github+json" \ https://api.github.com/repos/${{ github.repository }}/actions/workflows/build_loop.yml/enable - curl --fail -X POST \ -H "Authorization: Bearer ${GH_PAT}" \ -H "Accept: application/vnd.github+json" \ https://api.github.com/repos/${{ github.repository }}/actions/workflows/build_loop.yml/dispatches \ - -d '{"ref":"${{ github.ref_name }}"}' + -d '{"ref":"${{ github.ref_name }}", "inputs": {"is_scheduled": "true"}}' From d3c5a9cff844c5264b2923e8cd02c77c581cea13 Mon Sep 17 00:00:00 2001 From: daghaian <16483722+daghaian@users.noreply.github.com> Date: Wed, 24 Jun 2026 10:48:14 -0700 Subject: [PATCH 3/4] feat: Adds an additional scheduled workflow for resolving the auto disable for the build loop --- .github/workflows/trigger_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/trigger_build.yml b/.github/workflows/trigger_build.yml index 5b5f6865b..ed8970bee 100644 --- a/.github/workflows/trigger_build.yml +++ b/.github/workflows/trigger_build.yml @@ -1,4 +1,4 @@ -name: 4. Build Loop +name: 4. Trigger Build Loop run-name: Trigger Build Loop (${{ github.ref_name }}) on: workflow_dispatch: @@ -22,4 +22,4 @@ jobs: -H "Authorization: Bearer ${GH_PAT}" \ -H "Accept: application/vnd.github+json" \ https://api.github.com/repos/${{ github.repository }}/actions/workflows/build_loop.yml/dispatches \ - -d '{"ref":"${{ github.ref_name }}", "inputs": {"is_scheduled": "true"}}' + -d '{"ref":"${{ github.ref_name }}"}' From b1be26106b47b778cc95ad9fa44fde9611229f97 Mon Sep 17 00:00:00 2001 From: daghaian <16483722+daghaian@users.noreply.github.com> Date: Fri, 26 Jun 2026 15:38:44 -0700 Subject: [PATCH 4/4] renamed input to be more explicit since the trigger job can also technically be run manually --- .github/workflows/build_loop.yml | 6 +++--- .github/workflows/trigger_build.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_loop.yml b/.github/workflows/build_loop.yml index 9c9fdbfa7..84844cbd0 100644 --- a/.github/workflows/build_loop.yml +++ b/.github/workflows/build_loop.yml @@ -3,7 +3,7 @@ run-name: Build Loop (${{ github.ref_name }}) on: workflow_dispatch: inputs: - is_scheduled: + dispatched_by_trigger: description: 'Whether this was dispatched from the trigger scheduled workflow' required: false type: boolean @@ -159,7 +159,7 @@ jobs: uses: ./.github/workflows/create_certs.yml secrets: inherit if: | - (github.event_name == 'workflow_dispatch' && github.event.inputs.is_scheduled != 'true') || + (github.event_name == 'workflow_dispatch' && github.event.inputs.dispatched_by_trigger != 'true') || (vars.SCHEDULED_BUILD != 'false' && needs.check_status.outputs.IS_SECOND_IN_MONTH == 'true') || (vars.SCHEDULED_SYNC != 'false' && needs.check_status.outputs.NEW_COMMITS == 'true' ) @@ -172,7 +172,7 @@ jobs: contents: write if: | # builds with manual start; if scheduled: once a month or when new commits are found - (github.event_name == 'workflow_dispatch' && github.event.inputs.is_scheduled != 'true') || + (github.event_name == 'workflow_dispatch' && github.event.inputs.dispatched_by_trigger != 'true') || (vars.SCHEDULED_BUILD != 'false' && needs.check_status.outputs.IS_SECOND_IN_MONTH == 'true') || (vars.SCHEDULED_SYNC != 'false' && needs.check_status.outputs.NEW_COMMITS == 'true' ) steps: diff --git a/.github/workflows/trigger_build.yml b/.github/workflows/trigger_build.yml index ed8970bee..4f8db27f1 100644 --- a/.github/workflows/trigger_build.yml +++ b/.github/workflows/trigger_build.yml @@ -22,4 +22,4 @@ jobs: -H "Authorization: Bearer ${GH_PAT}" \ -H "Accept: application/vnd.github+json" \ https://api.github.com/repos/${{ github.repository }}/actions/workflows/build_loop.yml/dispatches \ - -d '{"ref":"${{ github.ref_name }}"}' + -d '{"ref":"${{ github.ref_name }}", "inputs": {"dispatched_by_trigger": "true"}}'