actions / actions/starter-workflows
import { WorkflowEntrypoint, WorkflowStep } from "cloudflare:workers";
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.1k
- Forks
- 7.3k
- PR merge metrics
- No merged PRs in 30d
Description
import { WorkflowEntrypoint, WorkflowStep } from "cloudflare:workers";
import type { WorkflowEvent } from "cloudflare:workers";
type Params = { name: string };
type IPResponse = { result: { ipv4_cidrs: string[] } };
export class MyWorkflow extends WorkflowEntrypoint<Env, Params> {
async run(event: WorkflowEvent, step: WorkflowStep) {
const data = await step.do("fetch data", async () => {
const response = await fetch("https://api.cloudflare.com/client/v4/ips");
return await response.json();
});
await step.sleep("pause", "20 seconds");
const result = await step.do(
"process data",
{ retries: { limit: 3, delay: "5 seconds", backoff: "linear" } },
async () => {
return {
name: event.payload.name,
ipCount: data.result.ipv4_cidrs.length,
};
},
);
return result;
}
}
Originally posted by @flynnjustin24 in https://github.com/flynnjustin24/skills-hello-github-action/issues/6#issuecomment-3813593157
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No target file, test, entry point, or requested change is identified. Start by reviewing the issue body and repository context, then clarify whether this TypeScript Cloudflare Workflow is intended as a starter workflow and where it should be added. Done requires an agreed scope and location before implementation can begin.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cloud, devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100