Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Support env setting of AGENT_TOOLSDIRECTORY as in the setup-python action

Đang mở
#1,039 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 4 ngày

@th-le đang làm issue này rồi.

Từ ngày 10/5/2024.

  • #1040 của @th-le — đang mở

Đá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
45/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
github-actions, node.js, typescript
Lĩnh vực
ci-cd, devops

Hướng nghiên cứu

Bắt đầu trong src/main.ts và so sánh điểm vào run của nó với triển khai setup-python được liên kết. Được xem là hoàn tất khi một giá trị không rỗng của AGENT_TOOLSDIRECTORY được nhận diện để RUNNER_TOOL_CACHE sử dụng cùng thư mục, và hành vi được kiểm tra dựa trên phần xác thực hiện có của repository.

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

Mô tả

feature request

Description:
as in setup python

  if (IS_MAC) {
    process.env['AGENT_TOOLSDIRECTORY'] = '/Users/runner/hostedtoolcache';
  }

  if (process.env.AGENT_TOOLSDIRECTORY?.trim()) {
    process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
  }

  core.debug(
    `Python is expected to be installed into ${process.env['RUNNER_TOOL_CACHE']}`
  );

setup-node should read the AGENT_TOOLSDIRECTORY environment variable and if it exists, sets the RUNNER_TOOL_CACHE variable equal to it

A GitHub support agent said:

I was able to get this to work by forking actions/setup-node and copying the same implementation on actions/setup-python to allow support for AGENT_TOOLSDIRECTORY on my fork - essentially just throwing in those few lines where the run function is defined here.

Justification:
Other actions already support this declaration and we need to use it to populate a caching system we are building to avoid hitting GitHub.com so often to install programming languages.

Are you willing to submit a PR?
possibly, I will need to check schedule with our engineering team.

Ngôn ngữ chính
TypeScript
Star
5k
Fork
1.7k
Merge trung bình
5 ngày 4 giờ
Pull request đã merge (30 ngày)
6

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

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

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 actions/setup-node

Tất cả issue của actions/setup-node

Issue tương tự

Thêm issue về TypeScript

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.