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
The issue body contains only a TypeScript Cloudflare Workers workflow snippet and no requested change, target file, or test. First determine whether this is intended for actions/starter-workflows or the linked original issue; no completion criteria can be established from this issue alone.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, typescript
- Domain
- ci-cd, devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 10/100