Skip to repository content54 lines · 1.7 KB · rust
tenant.openagents/omega
No repository description is available.
OpenAgents Git authority 2026-07-28T06:51:12.866Z Public web read
NIP-34 coordinate
30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omegaMaintainersHidden in public view
References2 branches · 1 tag
Read-only clone
git clone https://openagents.com/git/tenant.openagents/omega.gitBrowse files
compliance_check.rs
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