Skip to content

Gate manual SAP deploys on successful CI for the target commit#64

Merged
MagPasulke merged 1 commit into
mainfrom
copilot/change-deploy-sap-workflow
May 30, 2026
Merged

Gate manual SAP deploys on successful CI for the target commit#64
MagPasulke merged 1 commit into
mainfrom
copilot/change-deploy-sap-workflow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 30, 2026

deploy-sap was triggered automatically from ci. This changes the workflow to manual-only and adds an explicit gate so SAP deployment can run only for main when the selected commit already has a successful ci run.

  • Trigger model

    • Replace workflow_run with workflow_dispatch
    • Stop automatic SAP deployment after every successful CI completion
  • Deployment gate

    • Add a verify-ci job ahead of deployment
    • Fail early unless the workflow is run for main
    • Query GitHub Actions runs for ci.yml and require a successful push run for the exact HEAD commit being deployed
  • Workflow permissions

    • Grant read access to Actions metadata so the gate can inspect prior workflow runs
on:
  workflow_dispatch:

jobs:
  verify-ci:
    steps:
      - uses: actions/github-script@v8
        with:
          script: |
            const run = runs.find((candidate) =>
              candidate.head_sha === context.sha && candidate.event === 'push');

            if (!run || run.conclusion !== 'success') {
              core.setFailed('No successful ci run found for this commit.');
            }

  deploy-sap:
    needs: verify-ci

Copilot AI changed the title Make deploy-sap manual and gate it on successful CI Gate manual SAP deploys on successful CI for the target commit May 30, 2026
Copilot AI requested a review from MagPasulke May 30, 2026 13:33
@MagPasulke MagPasulke marked this pull request as ready for review May 30, 2026 21:28
@MagPasulke MagPasulke merged commit b6b38ed into main May 30, 2026
1 check passed
@MagPasulke MagPasulke deleted the copilot/change-deploy-sap-workflow branch May 30, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants