Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-28T05:42:04.874Z Public web read
NIP-34 coordinate30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omega
MaintainersHidden in public view
References2 branches · 1 tag
Read-only clonegit clone https://openagents.com/git/tenant.openagents/omega.git
Browse files

compliance_check.rs

54 lines · 1.7 KB · rust
1use gh_workflow::{Event, Job, Schedule, Workflow, WorkflowDispatch};
2
3use crate::tasks::workflows::{
4    release::{ComplianceContext, add_compliance_steps},
5    runners,
6    steps::{self, CommonJobConditions, CommonPermissionSets, named},
7    vars::StepOutput,
8};
9
10pub fn compliance_check() -> Workflow {
11    let check = scheduled_compliance_check();
12
13    named::workflow()
14        .with_minimal_permissions()
15        .on(Event::default()
16            .schedule([Schedule::new("30 17 * * 2")])
17            .workflow_dispatch(WorkflowDispatch::default()))
18        .add_env(("CARGO_TERM_COLOR", "always"))
19        .add_job(check.name, check.job)
20}
21
22fn scheduled_compliance_check() -> steps::NamedJob {
23    let determine_version_step = named::bash(indoc::indoc! {r#"
24        VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' crates/zed/Cargo.toml | tr -d '[:space:]')
25        if [ -z "$VERSION" ]; then
26            echo "Could not determine version from crates/zed/Cargo.toml"
27            exit 1
28        fi
29        TAG="v${VERSION}-pre"
30        echo "Checking compliance for $TAG"
31        echo "tag=$TAG" >> "$GITHUB_OUTPUT"
32    "#})
33    .id("determine-version");
34
35    let tag_output = StepOutput::new(&determine_version_step, "tag");
36
37    let job = Job::default()
38        .with_repository_owner_guard()
39        .runs_on(runners::LINUX_SMALL)
40        .add_step(steps::checkout_repo().with_full_history())
41        .add_step(steps::cache_rust_dependencies_namespace())
42        .add_step(determine_version_step);
43
44    named::job(
45        add_compliance_steps(
46            job,
47            ComplianceContext::Scheduled {
48                tag_source: tag_output,
49            },
50        )
51        .0,
52    )
53}
54
Served at tenant.openagents/omega Member data and write actions are omitted.