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

Allow for array specification for elements accepting multiple values.

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

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

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
32/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
azure, github-actions, typescript
Lĩnh vực
ci-cd, devops

Hướng nghiên cứu

Issue không nêu tên tệp hoặc test nào. Hãy bắt đầu bằng cách lần theo cách Azure DevOps task và GitHub Action đọc các đầu vào imageTag và cacheFrom, sau đó so sánh cách chúng tạo đối số; được xem là hoàn tất khi các mảng được hỗ trợ tạo ra các giá trị riêng biệt và việc sử dụng nhiều giá trị cho cacheFrom được ghi lại.

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

Mô tả

Azure DevOps pipeline definitions (and potentially GitHub Actions as well, but I haven't done much with them) allows for inputs to tasks and template parameters to be arrays.

Where possible, please consider switching to using this functionality, instead of whatever other style is used currently. It would mean the definition could look like this:

- task: DevcontainersCi@0
  inputs:
    imageName: $(RegistryImage)
    # Currently imageTag is a comma separated list
    imageTag:
      - $(VersionTag)
      - ${{ if parameters.pushLatest }}:
        - latest
    push: filter
    sourceBranchFilterForPush: refs/heads/main
    # Currently cacheFrom requires a multi-line definition
    cacheFrom:
      - $(RegistryImage):latest
      - $(RegistryImage):$(VersionTag)
    noCache: ${{ parameters.noCache }}

... instead of:

- task: DevcontainersCi@0
  inputs:
    imageName: $(RegistryImage)
    ${{ if parameters.pushLatest }}:
      imageTag: $(VersionTag),latest
    ${{ else }}:
      imageTag: $(VersionTag)
    push: filter
    sourceBranchFilterForPush: refs/heads/main
    # To get multiple items
    cacheFrom: |
      $(RegistryImage):latest
      $(RegistryImage):$(VersionTag)
    noCache: ${{ parameters.noCache }}

As an aside, there appears to be **no** documentation around how to pass multiple elements to `cacheFrom`. It doesn't complain if you pass a comma-separated list (somehow), but it only generates a single `--cache-from` argument, instead of a separate one for each image.
Ngôn ngữ chính
TypeScript
Star
499
Fork
101
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 devcontainers/ci

Tất cả issue của devcontainers/ci

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.