support `script-file` - path to a file.
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- github-actions, javascript
- Lĩnh vực
- ci-cd
Hướng nghiên cứu
Review the action.yml and the documented sibling action.js workaround first, then trace how the existing script input is handled. Define support for absolute and repository-root-relative script paths, reject the file:// protocol, and verify that a JavaScript file can be used by github-script.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
passing JS as a multiline string parameter makes the script inaccessible to lint tools.
Describe the solution you'd like
It would be nice if I could write the action in a JS file, enjoying linters and any in-IDE help I can get, while still coding for github-script.
Describe alternatives you've considered
The work around, as documented is, for example, in a step that is a part of another compound action:
- uses: actions/github-script@v7
with:
script: |
const action = require('${{ github.action_path }}/action.js');
await action({ core, context /* ... and more by need... */ });
and in action.js as sibling file to my action.yml
module.exports = async ({ core, context, /* ... and more by need... */ }) => {
//...
}
Additional context
which is a work around, and assumes a paths structure.
The action could support it just as easy :)
Generalizing from that - I believe we can support expecting just an absolute path, or a path relative to repo root (with the Distinction is if it starts with / - its absolute, input check should deny file:// protocol.
- Ngôn ngữ chính
- TypeScript
- Star
- 5k
- Fork
- 586
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của actions/github-script
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
actions/github-script#728 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
actions/github-script#727 · 1 reaction ·
-
{ Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
actions/github-script#724 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
actions/github-script#723 · 1 bình luận ·
-
Immutable releases Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
actions/github-script#706 · 1 bình luận · 14 reaction ·
Tất cả issue của actions/github-script
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
bug v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
modelcontextprotocol/inspector#2458 · 1 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
carbon-design-system/ibm-products#9907 ·