360 Secure SkillHub
360 安全技能中心

Gh Actions Automation

根据 package.json、pyproject.toml 或 Dockerfile 判断项目类型,提供 Node.js、Python 与 Docker 的 GitHub Actions CI/CD 工作流模板,并给出 checkout 版本、npm ci 和 Secrets 存放等使用提示。不执行流程或校验 YAML。

分类:开发
sky-lv
sky-lv
热度 6.01
最近更新 2026-05-11 17:45:27

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add sky-lv/gh-actions-automation
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
skylv-github-actions-helper
slug
skylv-github-actions-helper
version
1.0.0
description
GitHub Actions workflow generator. Creates CI/CD pipelines for Node.js, Python, Docker. Triggers: github actions, ci cd, workflow, automate build, github ci.
author
SKY-lv
license
MIT
tags
["automation","tools"]
keywords
["automation","tools"]
triggers
github-actions-helper

GitHub Actions Helper

Overview

Generates GitHub Actions workflows for continuous integration and deployment.

When to Use

  • User asks to "set up CI" or "add github actions"
  • New project needs automated testing
  • User wants to "deploy with github actions"

How It Works

Detect project type

Check for: package.json (Node), pyproject.toml (Python), Dockerfile (Docker).

Node.js CI Template

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

Python CI Template

name: Python CI
on: [push, pull_request]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with: { python-version: "3.12" }
      - run: pip install -r requirements.txt
      - run: pytest

Tips

  • Use actions/checkout@v4 not @v4.2.0
  • Use npm ci not npm install for reproducibility
  • Store secrets in GitHub Secrets