Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Dec 18, 2023
1 parent de722d6 commit e376bec
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,26 @@ dagger mod install github.com/fluent-ci-templates/spin-pipeline@mod
| build | Build your Spin application (Only Rust is supported at the moment). |
| deploy | Deploy your Spin application to Fermyon Platform. |

```graphql
build(src: String!): String
```typescript
build(
src: string | Directory
): Promise<Directory | string>

deploy(
authToken: String!,
cacheKey: String,
cachePath: String,
src: String!
): String

src: string | Directory,
authToken: string | Secret,
cachePath = "/app/target",
cacheKey = "spin-target-cache"
): Promise<string>
```

## Programmatic usage

You can also use this pipeline programmatically:

```typescript
import { build, deploy } from "https://pkg.fluentci.io/spin_pipeline@v0.7.0/mod.ts";
import { build, deploy } from "https://pkg.fluentci.io/spin_pipeline@v0.8.0/mod.ts";

await build();
await deploy();
await deploy(".", Deno.env.get("SPIN_AUTH_TOKEN")!);
```
2 changes: 1 addition & 1 deletion ci.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
build,
deploy,
} from "https://pkg.fluentci.io/spin_pipeline@v0.7.0/mod.ts";
} from "https://pkg.fluentci.io/spin_pipeline@v0.8.0/mod.ts";

await build();
await deploy();

0 comments on commit e376bec

Please sign in to comment.