Which event deserves to run the pipeline?

A developer corrects a spelling error in a support portal and unexpectedly starts a production publication workflow. The problem is not the edit but the trigger: a broad repository rule treats every push as permission to release. This episode explains how to distinguish events t…

A developer corrects a spelling error in a customer support portal. Seconds later, a pipeline begins preparing a production release. The developer intended to check a proposed change, not publish new software. The repository automation is doing exactly what its trigger rule allows: every push starts the release workflow. The problem is that an event that deserves a test has been mistaken for an event that deserves permission to publish.

Consider this an illustrative software team. Its portal is maintained by several developers, reviewed through a shared repository, and released to customers under a separate approval process. The team wants feedback quickly, so it uses automation to build and test proposed changes. It also wants predictable releases, so approved versions are packaged and deployed through a controlled path. Those goals are compatible, but only if the pipeline can distinguish a request for evidence from authorization to change a live system.

A trigger is the event or condition that starts a workflow. An event can say that someone pushed a commit, opened a pull request, created a tag, reached a scheduled time, or deliberately requested a manual run. An event explains why execution began. It does not, by itself, prove that the source code is trustworthy, that the person who caused the event can authorize a release, or that the conditions for production have been met. The workflow must make those decisions using the event's context and the organization's controls.

The first design decision is whether every contribution should receive the same response. A developer pushing work to a temporary branch may need compilation, tests, and a review report. A change merged to a protected main branch may qualify for creating a release candidate. A reviewed tag may identify the candidate that the deployment process can promote. Those events convey different levels of readiness. Treating them as interchangeable produces either needless expensive work or surprising production changes.

The Bare Metal Cyber AutoOps+ Study Guide can help you revisit this distinction after the lesson. Picture the portal's spelling fix and decide what should start immediately, what should wait for review, and what must require release authority. The exercise is useful because the trigger itself is simple; the hard part is deciding which consequences the event is allowed to cause.

In Git-based workflows, a push is an update sent to a repository reference. It may update a branch, and in many supported systems creating or updating a tag can also produce a push-related event. A pull request or merge request has a different purpose: it proposes a change for review and usually offers context about the source and target branches. Platform terminology and available event details vary, but the main difference is steady. Testing proposed work and publishing approved work should not depend on one broad rule that accepts every repository change.

Suppose the portal team fixes its configuration so a new branch push starts only its build and test jobs. The result is a review signal. A failure can stop the change before it is merged. A success tells reviewers which checks passed on which revision, but it does not declare the change approved or production-ready. If the branch contains several commits, the checks need to be associated with the exact revision being reviewed. A green result from an older revision should not silently cover a newer change added afterward.

Branch filters can limit which names qualify, but names carry risk. Calling a branch production does not make the person who created it an authorized release manager. Protection rules can control who may update a branch and under what review conditions. Similar controls can restrict tags, though the exact feature set differs by platform. A secure design relies on enforced permissions and verified provenance, not on a reassuring word in a name. A tag called approved is merely a label unless the process protects the authority to apply it.

Pull requests introduce a special trust problem. Code contributed for review may not have the same trust level as code already approved by repository maintainers. A public project may accept proposals from people outside the organization. It is valuable to run limited checks on that work, but a test runner that executes contributed code should not automatically receive production credentials or broad authority to alter the repository. A malicious or simply mistaken contribution can misuse any capability available to the running job. Controls for credentials, tokens, network access, runner isolation, and approval must match the trust level of the event.

The exact behavior depends on the automation platform and event type. Some pull-request workflows deliberately restrict tokens and prevent secrets from being exposed to untrusted contributors. Other events may run with a more privileged context. Treating every event as though it has identical permissions is a dangerous shortcut. An engineer should check the platform's documented trust model and evaluate what code a privileged job will execute. The defensive principle is general: do not combine untrusted source content with release authority merely because a workflow was triggered inside an approved repository.

For the portal, the team separates an ordinary contribution workflow from a controlled publication workflow. Proposed changes can execute tests with restricted permissions. A successful review and merge can prepare a candidate from the approved code line. Only a separate authorized transition can publish it. The events are still automated, but the authority attached to each event changes as the code earns trust. This prevents a typo correction on an unreviewed branch from having the same consequences as an approved release.

Tags add another nuance. A release process may use tags to identify versions, but tags can sometimes be moved or recreated if protections do not prevent it. Even where a tag name is protected, the workflow should record the underlying commit and artifact identity. Otherwise, a release report may say it processed version three while leaving uncertainty about which code that label represented at execution time. A tag is most useful when its provenance can be checked and its relationship to the tested artifact is unambiguous.

For a closer look at how that trust boundary shifts across events, the Bare Metal Cyber Academy AutoOps+ transcripts are an optional follow-up. Compare a branch push, a proposed pull request, and a protected release tag. Describe what each establishes and what remains uncertain. Explaining that gap is more useful than reciting the event catalog of a particular platform.

Scheduled workflows seem simpler because no person is actively pushing code when the clock reaches a chosen time. A nightly maintenance pipeline might run dependency checks, rebuild documentation, or verify that a service still passes integration tests. Yet the clock only establishes that it is time to consider running. The workflow still needs to know which code revision to use, which environment it may access, and whether concurrent work makes the scheduled run unsafe. For some services, a nightly production job should refuse to start while an approved deployment is changing the same resources.

Schedules can also behave differently under different systems. Their execution time, branch selection, and reliability should be read from the actual platform documentation and tested rather than assumed. A schedule should not be the only safeguard for a time-critical business operation when delays or missed runs would cause harm. A robust design has monitoring for the expected completion, a way to handle missed work, and a clear rule about whether a late run remains appropriate. A batch process that calculates yesterday's transactions may require different handling from a cleanup job that can safely run at the next opportunity.

Manual triggers are not a failure of automation. Sometimes the right event is an authorized operator deciding that the prerequisites for a sensitive change have been met. A manual workflow can still retrieve a known artifact, execute standard checks, enforce environment restrictions, and record the result. It need not be a collection of hand-typed production commands. The difference is that a human initiates the workflow at a controlled decision point. Who can invoke it, which revision they can select, and what approvals apply remain important technical questions.

The portal team uses a manual release request for changes that affect customer-facing authentication. A release manager chooses an already reviewed candidate. The system checks that the candidate's identity matches the tests and approvals recorded for it. If the operator selects a branch containing newer unreviewed commits, the workflow refuses the release rather than simply trusting the operator's intention. Human authorization and automated eligibility checks reinforce each other. Neither has to substitute for the other.

Event metadata can help scope work. A change touching only documentation might not need the full production integration suite. A modification to deployment configuration might need additional review and a different test environment. Paths, branches, labels, and event types can inform those choices. The team must understand their limits. A file filter that misses a shared dependency can suppress an essential test. Some systems evaluate changed-file conditions differently for scheduled runs or new branches. A safe optimization requires knowing exactly what the rule considers changed and what it cannot see.

Duplicate events create another operational hazard. A developer pushes to a branch that already has an open pull request. Depending on the workflow rules, both a branch pipeline and a pull-request pipeline may start for essentially the same code. Running two sets of tests wastes capacity. If both are allowed to publish the same artifact or update the same external environment, the effects can be much worse. The team can design rules that avoid unintended duplicate pipelines, and it can also limit concurrency where work cannot safely overlap.

Concurrency control is different from a trigger. A trigger answers whether a run is eligible to start. Concurrency rules decide what happens when several eligible runs contend for the same resource. Consider a deployment to a shared test environment. Two reviewed commits arrive close together. The workflow may need to queue them, cancel an obsolete test deployment, or deliberately reject an overlapping change. Which option is appropriate depends on whether the work is replaceable and whether the first run has made persistent changes. Blind cancellation can leave partially updated systems, so the rule must reflect the operation's actual behavior.

Some pipelines are triggered by another completed workflow. This can be useful when testing and publishing are separated, but it is also a trust boundary. A job that receives a completion event should verify the upstream result, artifact identity, and authority before doing privileged work. The mere fact that another pipeline finished does not make its outputs safe to execute or promote. In some systems, privileged follow-on workflows run in a different security context from the untrusted work that preceded them. The transition deserves explicit scrutiny.

The team now examines the original faulty rule. It ran on any push and contained both build checks and a publication job. A recent change had moved the publication credentials into a broadly available environment. The repository's tests were capable of catching coding defects, but the trigger allowed an unreviewed branch to reach a release step. The team does not solve this by removing tests from feature branches. It limits the release job to approved contexts, narrows credential exposure, and validates the reviewed artifact at promotion time.

A careful fix also considers attempts to bypass the intended path. Someone might create a tag on an unreviewed commit, request a manual run using the wrong reference, or trigger an external event that impersonates an ordinary release request. The workflow should not rely on a single user-supplied string saying that approval happened. It should verify trusted repository state, enforced review requirements, and the candidate's recorded identity. The exact implementation will vary, but the reasoning stays anchored to authority rather than event names alone.

After the change, the team tests its trigger policy with harmless examples. A documentation edit on an ordinary branch should create review evidence without publication. An approved merge should produce the intended candidate. An unapproved tag or unauthorized manual request should fail to gain release authority. An approved release should publish the exact reviewed artifact and leave an auditable record. These observations are stronger than staring at a workflow definition and assuming that its conditions are correct.

The team also assigns ownership for exceptions. Emergency fixes sometimes need a faster path, but a faster path still requires an accountable decision and a record of what checks were bypassed or completed. If a security incident makes the usual repository unavailable, an alternative authorized process may be necessary. That is a reason to design and rehearse a controlled exception, not a reason to leave a permanent unrestricted trigger for anyone who can create an event.

By the end of the review, the portal's automation is both faster and less surprising. Developers get immediate feedback on proposed work. Maintainers can identify which revision earned approval. Release managers promote a traceable candidate with narrowly scoped authority. Scheduled and manual work have clear purposes, and duplicate runs cannot quietly fight over a shared environment. The lesson is that an event explains why a workflow woke up. The engineering decision is what that event is trusted to cause.

Which event deserves to run the pipeline?
Broadcast by