Adopt gh actions-lock for GitHub Actions

Đã đóng Phù hợp với người mới
#41 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
70/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github, github-actions
Lĩnh vực
ci-cd

Hướng nghiên cứu

Bắt đầu từ các tệp workflow hiện có trong .github/workflows/ và ghi lại mọi dòng uses: ghim một action theo tag hoặc branch. Cài đặt tiện ích gh actions-lock và chạy nó để tạo .github/workflows/actions.lock, sau đó thêm verify-lockfile.yml chạy gh actions-lock --verify trên pull request và push. Hoàn thành khi lockfile và workflow xác minh đã được commit và job xác minh vượt qua trên một pull request.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

GitHub Actions in this repository reference actions or reusable workflows by mutable tag or branch, and are not yet locked with gh actions-lock.

gh actions-lock keeps readable version tags in your uses: lines and records the exact commit SHA of every direct and transitive action in .github/workflows/actions.lock. A compromised or force-pushed tag can no longer silently change the code your workflows execute, and changes to the lockfile are visible in pull request diffs.

What is missing
  • No lockfile found at .github/workflows/actions.lock
  • No verify workflow found at .github/workflows/verify-lockfile.yml
What to do
  1. Install the extension and generate the lockfile:

    gh extension install github/gh-actions-lock
    gh actions-lock
    

    Keep version tags in uses: (for example actions/[email protected]). Any inline commit SHAs are rewritten back to version tags automatically.

  2. Add .github/workflows/verify-lockfile.yml, which runs gh actions-lock --verify on every pull request and push to catch drift or tampering.

  3. Commit .github/workflows/actions.lock and the verify workflow.

References
Ngôn ngữ chính
Rust
Star
50
Fork
9
Merge trung bình
2 giờ 49 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của esphome/esp-stacktrace-decoder

Tất cả issue của esphome/esp-stacktrace-decoder

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.