Skip to content

Commit 251ece6

Browse files
committed
fix issue
1 parent 1d92420 commit 251ece6

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/dagger-fraud-sim.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ jobs:
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

dagger/src/fraud_simulation/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)