Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)48k · #4745

github-actions-templates

Skill này làm gì

Công cụ này giúp tạo các mẫu sẵn sàng cho sản xuất để tự động hóa các tác vụ như kiểm thử, xây dựng và triển khai dự án phần mềm trên GitHub. Nó cung cấp ví dụ về cách thiết lập các tự động hóa này.

Khi nào nên dùng

  • ✓Khi bạn muốn tự động hóa việc kiểm thử mã.
  • ✓Khi chuẩn bị dự án để được xây dựng hoặc phát hành.
  • ✓Khi thiết lập một quy trình triển khai được ủy quyền.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/github-actions-templates/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/github-actions-templates/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tạo một mẫu workflow để kiểm thử dự án Node.js của tôi.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ cung cấp các ví dụ mã (gọi là 'workflow') mà bạn có thể điều chỉnh. Các ví dụ này cho thấy cách GitHub có thể tự động chạy các lệnh cụ thể, như kiểm thử, trên dự án của bạn.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

GitHub Actions Workflow Patterns

When to Use

Implement testing, matrix builds, artifact preparation or an explicitly authorized deployment workflow for an existing repository.

Inputs

Inspect the repository's actual scripts, lockfile, supported runtimes, required check names and release policy. Read resources/implementation-playbook.md and references/common-workflows.md before choosing job boundaries.

Test Workflow

This Node example assumes the target repository declares npm test and supports Node 22. Adapt the runtime and command to the actual project. The pinned action revisions are explicit review inputs; verify them before adopting or updating the template.

name: Test
on:
  pull_request:
  push:
    branches: [main]
permissions:
  contents: read
jobs:
  test:
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
        with:
          persist-credentials: false
      - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444
        with:
          node-version: '22'
          cache: npm
      - run: npm ci
      - run: npm test

Matrix Builds

Add a matrix only for versions and operating systems the project supports. Keep dependencies reproducible, identify failing combinations, and avoid hiding failures with blanket continue-on-error. Test required-check behavior when jobs are conditionally skipped.

Build and Publication

Build an artifact from the tested commit and record its identity. Publication needs a separate trusted job with the minimum registry permission. Do not publish artifacts produced by arbitrary untrusted code in a privileged context; bind accepted artifacts to their exact source and producing workflow.

Deployment

Use the project's protected release path. Identify the immutable artifact, destination, workload identity, rollout and rollback checks before adding deployment commands. A named GitHub environment does not configure reviewers automatically. Verify its actual protections. Do not label a placeholder echo command as a successful deployment.

Verification

Exercise one passing change and one deliberate test failure on a topic branch. Confirm the failing check prevents downstream publication. Inspect tokens, runner isolation, caches and artifact boundaries. Keep production credentials absent from untrusted validation jobs.

Example

A project needs Linux and Windows tests. Select its supported runtime, add the two runner combinations and confirm that either failure blocks the required result. Prepare publication separately; do not add registry credentials to the matrix.

Limitations

This skill supplies patterns, not an installed deployment program. Repository policy, runner trust and environment settings must be inspected. Review every third-party action at its full commit SHA and treat logs and uploaded artifacts as possible data-exposure paths.

Sources

Câu hỏi thường gặp

Workflow GitHub Actions là gì?

Đây là tệp cấu hình cho GitHub biết cần làm gì, như chạy kiểm thử hoặc phát hành mã của bạn, khi các sự kiện nhất định xảy ra (như push thay đổi mới).

Tôi có thể dùng cái này cho mọi dự án không?

Các mẫu dành cho dự án trên GitHub. Bạn cần điều chỉnh chúng cho loại dự án và công cụ cụ thể của mình.

Công cụ này có tự động phát hành mã của tôi không?

Công cụ cung cấp mẫu để phát hành, nhưng bạn cần thiết lập và ủy quyền hành động này một cách cẩn thận, đảm bảo chỉ các artifact đáng tin cậy được phát hành.

Chi tiết

Mô tả gốc của tác giả

Production-ready GitHub Actions workflow patterns for testing, building, and deploying applications.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#4745
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự