From 4d69e43c72fa52101c417c306efb19ccb04682e7 Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Mon, 1 Sep 2025 09:41:26 +0100 Subject: [PATCH] chore(cicd): automating pipeline progression of dependabot bumps --- ...e-dependabot-prs-into-collected-branch.yml | 26 ++++++++++++++++--- ...collected-dependabot-staging-to-master.yml | 1 + .../collected-dependabot-to-staging.yml | 1 + 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.github/workflows/automerge-dependabot-prs-into-collected-branch.yml b/.github/workflows/automerge-dependabot-prs-into-collected-branch.yml index 6021872..9e3d50b 100644 --- a/.github/workflows/automerge-dependabot-prs-into-collected-branch.yml +++ b/.github/workflows/automerge-dependabot-prs-into-collected-branch.yml @@ -1,19 +1,38 @@ +# qqqq in development # This script seperate major and minor but we do merge them into the same branch. # Having two steps allows us to easily turn off major changes in future and then script them to their own branch and pipeline. name: Auto-merge Dependabot PRs into collected branch on: pull_request: - types: [opened, synchronize] + # synchronize + types: [opened] branches: [Automatic_version_update_dependabot] # Make sure this matches your actual branch name - + check_suite: + types: [completed] + workflow_dispatch: permissions: contents: write pull-requests: write jobs: + debug: + runs-on: ubuntu-latest + steps: + - name: Debug info + run: | + echo "Actor: ${{ github.actor }}" + echo "PR Title: ${{ github.event.pull_request.title }}" + echo "Target Branch: ${{ github.event.pull_request.base.ref }}" + echo "Source Branch: ${{ github.event.pull_request.head.ref }}" + - name: Wait for other checks to start + - name: Delay for check + run: | + # drop later qqqq shouldnt need but its running before auto + echo "Waiting 4 minutes for other checks to start running..." + sleep 240 auto-merge: runs-on: ubuntu-latest - if: github.actor == 'dependabot[bot]' + if: github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' steps: - name: Extract update type id: extract @@ -27,6 +46,7 @@ jobs: - name: Auto-merge minor and patch updates if: steps.extract.outputs.update_type == 'minor_or_patch' + # Auto should set the the request to merge once checks complete run: gh pr merge --auto --squash "${{ github.event.pull_request.html_url }}" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/collected-dependabot-staging-to-master.yml b/.github/workflows/collected-dependabot-staging-to-master.yml index 822ba31..fbb0e0f 100644 --- a/.github/workflows/collected-dependabot-staging-to-master.yml +++ b/.github/workflows/collected-dependabot-staging-to-master.yml @@ -1,3 +1,4 @@ +# qqqq in development name: Collected Dependabot Promotion From Staging To Master on: schedule: diff --git a/.github/workflows/collected-dependabot-to-staging.yml b/.github/workflows/collected-dependabot-to-staging.yml index 4306f22..c0a0376 100644 --- a/.github/workflows/collected-dependabot-to-staging.yml +++ b/.github/workflows/collected-dependabot-to-staging.yml @@ -1,3 +1,4 @@ +# qqqq in development name: Dependabot Collected Promotion To Staging # this logic will require branch ruleset checks of running the dev pipeline on: