Home › Developer Tools › GitHub Actions Workflow Generator

GitHub Actions Workflow Generator

Pick your stack and get a ready-to-commit .github/workflows file: push, pull request, tag and schedule triggers, a version and OS matrix, dependency caching, lint, test and build steps, and an optional deploy to GitHub Pages or GitHub Container Registry. Least-privilege permissions and a matching dependabot.yml are included.

Last updated:

Workflow
Triggers
Build matrix
Operating systems
Steps
Deploy & extras

Generated files

Save as

    Advertisement
    Advertisement

    How to use the GitHub Actions Workflow Generator

    1. Choose your project type: Node.js, Python, Go, Java, Rust, .NET, Docker image or static site.
    2. Set the triggers: branches for push and pull requests, optional tags such as v*, a cron schedule and manual runs.
    3. Configure the matrix of language versions and operating systems, and edit the install, lint, test and build commands.
    4. Choose a deploy target (GitHub Pages or a Docker image on GHCR) and extras like caching and artifacts.
    5. Copy or download the workflow, save it as .github/workflows/ci.yml in your repository and push. The run appears in the Actions tab.

    Workflow file structure

    KeyExampleMeaning
    onpush, pull_request, schedule, workflow_dispatchEvents that start the workflow
    permissionscontents: readScopes of the automatic GITHUB_TOKEN
    concurrencygroup: ${{ github.workflow }}-${{ github.ref }}Only one run per group; older PR runs are cancelled
    jobs.<id>.runs-onubuntu-latestRunner image for the job
    strategy.matrixnode: ['22', '24']Run the job once per combination
    steps[].usesactions/checkout@v5Run a published action at a version
    steps[].runnpm testRun a shell command
    needsneeds: testWait for another job to succeed first
    ifgithub.ref == 'refs/heads/main'Run a job or step only when the condition is true

    Actions used by the generator

    Major versions current as of 2025-2026. Pinning to a major tag gets bug fixes automatically; for maximum supply-chain safety you can pin to a full commit SHA instead and let Dependabot update it.

    ActionUsed for
    actions/checkout@v5Clone the repository into the runner
    actions/setup-node@v5, setup-python@v6, setup-go@v6, setup-java@v5, setup-dotnet@v4Install the language runtime, with built-in caching
    pnpm/action-setup@v4Install pnpm before setup-node
    dtolnay/rust-toolchain, Swatinem/rust-cache@v2Rust toolchain and cargo cache
    actions/upload-artifact@v4Keep build output for download
    actions/configure-pages@v5, upload-pages-artifact@v4, deploy-pages@v4Publish to GitHub Pages
    docker/setup-buildx-action@v3, login-action@v3, metadata-action@v5, build-push-action@v6Build, tag and push container images

    Tips for fast, reliable CI

    • Use clean installs (npm ci, pnpm install --frozen-lockfile) so CI fails when the lock file is out of date instead of silently resolving new versions.
    • Keep the matrix small for pull requests; testing every OS and version multiplies minutes. Test the oldest and newest supported versions.
    • Use paths-ignore for docs-only changes, but remember that a required status check that never runs blocks the merge.
    • Store credentials as secrets (Settings → Secrets and variables → Actions) and reference them as ${{ secrets.NAME }}; never echo them in logs.
    • Validate locally with a YAML validator, or run workflows on your machine with a tool such as act before pushing.

    Frequently asked questions

    Where do I put the workflow file?

    Save it in your repository under .github/workflows/ with a .yml or .yaml extension, for example .github/workflows/ci.yml, and push it to GitHub. Workflows run from the default branch for schedules and from the pushed branch for push and pull_request events. The dependabot.yml file goes directly in .github/.

    What does the matrix do?

    strategy.matrix runs the same job once for every combination of values, for example Node.js 22 and 24 on Ubuntu and Windows gives four parallel jobs. Set fail-fast to false to let the other combinations finish when one fails, so you see every broken version at once.

    How does dependency caching work?

    The official setup actions (setup-node, setup-python, setup-java, setup-go) can cache the package manager's download folder keyed on your lock file hash, so later runs reuse it instead of downloading everything. It requires a committed lock file such as package-lock.json or requirements.txt. Rust uses Swatinem/rust-cache and .NET uses actions/cache on the NuGet folder.

    Why set permissions: contents: read?

    The automatic GITHUB_TOKEN gets only the permissions you grant. Read-only contents is enough to check out code and limits the damage if a step or dependency is compromised. Jobs that need more ask for it explicitly: packages: write to push images, pages: write and id-token: write to deploy GitHub Pages.

    How do I deploy a site to GitHub Pages with Actions?

    Choose Deploy to GitHub Pages, set the build output folder, and in the repository settings set Pages → Source to GitHub Actions. The build job uploads the folder with actions/upload-pages-artifact and a deploy job publishes it with actions/deploy-pages into the github-pages environment.

    What cron syntax does the schedule use?

    Standard 5-field POSIX cron in UTC: minute, hour, day of month, month, day of week. For example 0 6 * * 1 runs every Monday at 06:00 UTC. The shortest interval is every 5 minutes, and scheduled runs can be delayed during periods of high load.

    Which action versions are used?

    Current major versions as of 2025-2026, for example actions/checkout@v5, actions/setup-node@v5, actions/setup-python@v6 and actions/setup-go@v6. Majors change over time, so the generated dependabot.yml checks the github-actions ecosystem weekly and opens pull requests when new versions are released.

    Are all the tools on FreeToolCabin tested for quality and accuracy?

    Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

    Related tools

    Dockerfile GeneratorGenerate a production Dockerfile and .dockerignore for Node, Python, Go or a static nginx site.Kubernetes YAML GeneratorGenerate Deployment, Service, Ingress, ConfigMap, Secret and HPA manifests with safe defaults.YAML Validator & FormatterValidate, format and minify YAML, and convert YAML to JSON or back.Cron Expression GeneratorBuild crontab schedules visually, read them in plain English and see the next run times.Quartz Cron GeneratorBuild and explain Quartz and Spring cron expressions with seconds, ?, L, W and #, plus next fire times.QR Code GeneratorMake QR codes for links, Wi-Fi, email and more.Barcode GeneratorCreate Code 128, EAN-13, UPC-A, EAN-8, Code 39 and ITF-14 barcodes as PNG or SVG.UUID GeneratorGenerate UUID v4 and v7 / GUIDs in bulk and copy or download them.Schema Markup Generator (JSON-LD)Create JSON-LD structured data for FAQ, Product, Article and more.Htaccess & Nginx Redirect GeneratorBuild 301 redirects for .htaccess, Nginx and Netlify or Cloudflare _redirects.Fake Data GeneratorGenerate mock data as JSON, CSV or SQL.Random String GeneratorGenerate secure random strings and tokens in bulk with any length and character set.API Key GeneratorCreate secure API keys and secrets with prefixes, checksums and SHA-256 hashes for storage.MIME Type LookupFind the MIME type for any file extension, or the extensions for a MIME type, in 400+ entries.URL Slug GeneratorTurn titles into clean, SEO-friendly URL slugs: accents, stop words, separators and bulk lines.JSON Schema GeneratorTurn sample JSON into a draft 2020-12 JSON Schema with types, required fields and formats.Gitignore GeneratorBuild a .gitignore from 50+ templates for languages, frameworks, IDEs and OS, merged and deduped.License GeneratorCreate a LICENSE file for MIT, Apache, GPL, BSD, ISC, MPL or Unlicense with your name and year.ULID GeneratorGenerate sortable ULIDs and UUID v7 in bulk, monotonic option, and decode their timestamps.Htpasswd GeneratorCreate .htpasswd entries with bcrypt, APR1-MD5 or SHA-1 for Apache and Nginx basic auth.Placeholder Image GeneratorCreate placeholder images in any size, color and text as PNG, JPG, WebP, SVG or data URI.Ads.txt GeneratorCreate or validate ads.txt and app-ads.txt files: seller lines, cert IDs and variables.Docker Run to Compose ConverterConvert docker run commands to docker-compose.yml, or a compose file back to docker run.HTML Boilerplate GeneratorTick the options you need and get a clean HTML5 starter template with meta, OG tags and CSS reset.JSON to Zod SchemaInfer a Zod (or Yup) schema from sample JSON with optional, nullable and z.infer types.Linux Commands Cheat SheetSearchable Linux and bash command reference with flags explained, examples and copy buttons.LLMs.txt GeneratorBuild an llms.txt file for AI crawlers: summary and link sections, import from your sitemap.Nano ID GeneratorGenerate secure Nano IDs with custom alphabet, length and count, plus a collision calculator.Nginx Config GeneratorBuild an nginx server block: static site, SPA, reverse proxy or PHP, with SSL, gzip and redirects.OpenAPI / Swagger ViewerView OpenAPI 2/3 JSON or YAML as interactive API docs with validation and an endpoint list.package.json GeneratorFill a form and get a valid, npm-ready package.json with scripts, dependencies and checks.PKCE Code Challenge GeneratorGenerate an OAuth 2.0 PKCE code_verifier and S256 code_challenge, build auth URLs, verify pairs.README GeneratorFill in a form and get a polished README.md with badges, install, usage and license, live preview.Regex GeneratorBuild regular expressions visually from blocks or presets (email, date, phone) and test them live.Commit Message GeneratorBuild Conventional Commit messages with type, scope, body, breaking change and issue refs.Database Schema DesignerDesign tables and relationships visually, then export SQL for MySQL, PostgreSQL or SQLite.Docker Compose GeneratorBuild a docker-compose.yml with a form: services, ports, volumes, env, healthchecks and presets.Dummy File GeneratorCreate test files of an exact size in KB, MB or GB with zeros, random bytes or text.cURL Command BuilderBuild curl commands from a form: method, headers, query, JSON or form body, auth and flags.Docker Compose to KubernetesConvert docker-compose.yml into Kubernetes Deployment, Service, ConfigMap and PVC manifests.Docker Compose ValidatorCheck a docker-compose.yml for YAML errors, schema mistakes, broken references and deprecated keys.Dockerfile LinterLint a Dockerfile for best practices: pinned tags, apt cleanup, non-root USER and layer count.Dockerignore GeneratorBuild a .dockerignore from Node, Python, Go and Java templates, plus your own entries.ESLint Config GeneratorGenerate a flat eslint.config.js for JavaScript, TypeScript, React or Node with rule presets.Git Branch Name GeneratorTurn a ticket ID and title into a clean, valid git branch name like feature/PROJ-12-add-login.GitLab CI Config GeneratorGenerate a .gitlab-ci.yml with stages, jobs, images, cache, artifacts and rules from templates.Jinja2 Template TesterRender Jinja2 templates with YAML or JSON variables using real Jinja2, with clear error lines.JSON Schema Mock Data GeneratorGenerate realistic sample JSON from a JSON Schema: formats, patterns, $ref, seeds and counts.Kubernetes Secret GeneratorCreate Kubernetes Secret YAML from key/value pairs or .env with auto base64, or decode one.Kubernetes YAML ValidatorValidate Kubernetes manifests against the API schema of a chosen version, with error paths.Prettier Config GeneratorToggle Prettier options, preview formatted code live and copy your .prettierrc file.README Badge GeneratorCreate Shields.io-style README badges for license, version, build and custom labels.Systemd Service File GeneratorCreate a systemd .service unit with ExecStart, user, restart policy, environment and hardening.tsconfig.json GeneratorBuild a tsconfig.json with target, module, strict checks and path aliases, each option explained.Access Log AnalyzerAnalyze Apache and Nginx access logs: top URLs, IPs, status codes, bots and traffic charts.Regex String GeneratorGenerate random test strings that match any regular expression, checked against the real regex.ASCII Table GeneratorTurn CSV or pasted cells into plain-text tables: MySQL, Markdown, Unicode box and reST styles.FFmpeg Command GeneratorPick a task and options, get the exact ffmpeg command with every flag explained.Folder Tree GeneratorTurn a local folder or an indented list into an ASCII directory tree for your README.Markdown TOC GeneratorGenerate a linked table of contents from Markdown headings with GitHub-style anchors.OpenAPI EditorEdit OpenAPI/Swagger YAML or JSON side by side with live API docs, validation and download.OpenAPI ValidatorValidate OpenAPI 3.0/3.1 and Swagger 2.0 specs: schema errors, broken $refs, line numbers.Pivot Table MakerBuild pivot tables from CSV or Excel by drag and drop: sum, count, average, charts, export.SQL Query BuilderBuild SELECT queries visually: joins, filters, GROUP BY, ORDER BY and LIMIT, as clean SQL.Truth Table GeneratorType a logic expression and get its full truth table, minterms and canonical DNF/CNF.TypeScript PlaygroundWrite TypeScript with live type checking, see the compiled JavaScript and run it in your browser.Article Schema GeneratorCreate Article, BlogPosting or NewsArticle JSON-LD with headline, authors, dates and images.Event Schema GeneratorCreate Event JSON-LD with dates, venue or online location, tickets, organizer and performers.
    See all 85 Code Generators & Builders →