GitHub Actions workflow generator prompt

Generate a complete GitHub Actions YAML workflow for tests, builds, or deployments, with dependency caching included.

بواسطة ‪Ahmed Eid‬‏0 نسخة

متى تستخدم هذا البرومبت

  • When setting up CI for a new repository.
  • When adding a deploy step to an existing test workflow.
  • When migrating from another CI provider to GitHub Actions.

نص البرومبت

Write a GitHub Actions workflow (.yml) for a {{language}} project using {{framework}} that runs on: {{focus}}. Include caching where it speeds up the build.

{{CLIPBOARD}}
{{language}}{{framework}}{{focus}}{{CLIPBOARD}}

الكتلة {{CLIPBOARD}} تُستبدل تلقائياً بما نسخته قبل الضغط على «نسخ».

كيف تستخدمه

  1. انسخ البرومبت بالزر أو املأ المتغيرات أولاً.
  2. الصقه في ChatGPT أو Claude أو Gemini.
  3. عدّل النتيجة أو أعد الطلب بتغيير المتغيرات.

مثال على النتيجة

name: CI
on: [push, pull_request]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: 'npm'
      - run: npm ci
      - run: npm test

نصائح للاستخدام

  • Specify triggers precisely (push to main, pull_request, tags) to avoid unwanted runs.
  • Mention any required secrets by name so it references them via secrets.NAME correctly.
  • Ask for a matrix build if you need to test multiple language or OS versions.

أسئلة شائعة

Can it add a deployment step too?
Yes, describe the target (Vercel, AWS, Docker Hub) in the focus field and it will add a deploy job guarded by a branch condition.
Will it know my exact test command?
Paste your package.json scripts or test runner config for an exact match; otherwise it uses common defaults for your framework.

برومبتات ذات صلة

Generate a GraphQL Schema from a Description

Describe your data and operations in plain English and get a complete, documented GraphQL schema.

Design a GraphQL schema (types, queries, mutations) for: {{focus}}. Use {{language}} conventions and include field-level descriptions. {{CLIPBOARD}}

{{focus}}{{language}}{{CLIPBOARD}}

Generate Realistic Mock Data for Testing

Get realistic, varied mock data, including edge cases, matched to your schema, ready to seed a test database.

Generate {{focus}} realistic mock/test data records in {{language}} format for this schema or type, with varied and edge-case values. {{CLIPBOARD}}

{{focus}}{{language}}{{CLIPBOARD}}

Explain What This Legacy Code Actually Does

Paste unfamiliar or legacy code and get a plain-language walkthrough, with dead code and possible bugs flagged.

Walk through this {{language}} code line by line and explain what it does, in plain language. Flag anything that looks like dead code, a workaround, or a potential bug. {{CLIPBOARD}}

{{language}}{{CLIPBOARD}}

Generate a Dockerfile for Your App

Get a secure, optimized Dockerfile tailored to your language and framework, ready to build and run.

Write a production-ready Dockerfile for a {{language}} app using {{framework}}. Use multi-stage builds where useful, minimize image size, and run as a non-root user. Notes: {{focus}}. {{CLIPBOARD}}

{{language}}{{framework}}{{focus}}{{CLIPBOARD}}
المزيد في برمجة