File tree Expand file tree Collapse file tree
dagger/src/fraud_simulation Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 GROQ_API_KEY : ${{ secrets.GROQ_API_KEY }}
2222 DAGGER_CLOUD_TOKEN : ${{ secrets.DAGGER_CLOUD_TOKEN }}
2323 run : |
24- dagger call run-fraud-sim --gemini-api-key env:GEMINI_API_KEY --groq-api-key env:GROQ_API_KEY
24+ dagger call run-fraud-sim --source . --gemini-api-key env:GEMINI_API_KEY --groq-api-key env:GROQ_API_KEY
Original file line number Diff line number Diff line change @@ -6,22 +6,22 @@ class FraudSimulation:
66 @function
77 async def run_fraud_sim (
88 self ,
9+ source : dagger .Directory ,
910 gemini_api_key : dagger .Secret ,
1011 groq_api_key : dagger .Secret ,
1112 ) -> str :
1213 """
1314 Runs the fraud simulation using the global Dagger context.
1415 """
1516
16- # Use global `dag` for host and container access
17- host_dir = dag .host ().directory ("." )
18-
17+ # Use the passed source directory instead of dag.host()
1918 base = (
2019 dag .container ()
2120 .from_ ("python:3.11-slim" )
22- .with_directory ("/app" , host_dir )
21+ .with_directory ("/app" , source )
2322 .with_workdir ("/app" )
2423 .with_exec (["pip" , "install" , "pydantic" ])
24+ .with_exec (["mkdir" , "-p" , "fraud_simulation" ])
2525 )
2626
2727 print ("\n " + "=" * 50 )
You can’t perform that action at this time.
0 commit comments