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

`Unrecognized named-value: 'matrix'` / `Available expression contexts: github, inputs, vars, needs, strategy, matrix, secrets, steps, job, runner, env`

Đang mở
#447 2 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
github-actions, typescript, vscode
Lĩnh vực
ci-cd, devtools

Hướng nghiên cứu

Tái hiện chẩn đoán trong ví dụ .github/workflows/ci.yml bằng VS Code 1.98.0 và GitHub Actions extension 0.27.1. Bắt đầu bằng cách lần theo quá trình xác thực các output ở cấp job có tham chiếu đến matrix; hoàn tất khi chẩn đoán phản ánh chính xác việc context đó có thể sử dụng được hay không và không còn mâu thuẫn với các context khả dụng được liệt kê.

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

Mô tả

Type: Bug

Create a .github/workflows/ci.yml file with:

name: CI
on:
  push:
  workflow_dispatch: 

env:
  REGISTRY: ghcr.io
  IMAGE_NAME: ${{ github.repository }}

jobs:
  build-arch:
    name: Build
    permissions:
      contents: read
      packages: write
      attestations: write
      id-token: write

    strategy:
      fail-fast: false
      matrix:
        include:
          - os: ubuntu-24.04
            name: amd
          - os: ubuntu-24.04-arm
            name: arm

    runs-on: ${{ matrix.os }}
    outputs:
      attestation-url: ${{ steps.attestation.outputs.attestation-url }}
      ${{ matrix.name }}-attestation-url: ${{ steps.attestation.outputs.attestation-url }}
      my-matrix: ${{ matrix }}
      ${{ toJSON(matrix) }}: 'x'

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Log in to the Container registry
        uses: docker/login-action@v3
        with:
          registry: ${{ env.REGISTRY }}
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - name: Extract metadata (tags, labels) for Docker
        id: meta
        uses: docker/metadata-action@v5
        with:
          images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

      - name: Build and push Docker image
        id: push
        uses: docker/build-push-action@v6
        with:
          context: .
          push: true
          tags: ${{ steps.meta.outputs.tags }}
          labels: ${{ steps.meta.outputs.labels }}

      - name: Generate artifact attestation
        id: attestation
        uses: actions/attest-build-provenance@v2
        with:
          subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
          subject-digest: ${{ steps.push.outputs.digest }}
          push-to-registry: true

          
  combine-images:
    name: Combine images
    permissions:
      contents: read
      packages: write
      attestations: write
      id-token: write

    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Log in to the Container registry
        uses: docker/login-action@v3
        with:
          registry: ${{ env.REGISTRY }}
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

See a red-squiggly near ${{ matrix.name }}-attestation-url: ${{ steps.attestation.outputs.attestation-url }}

Hover over ${{ matrix.name }}

See:

Unrecognized named-value: 'matrix'
Available expression contexts: github, inputs, vars, needs, strategy, matrix, secrets, steps, job, runner, env

View problem shows:

Unrecognized named-value: 'matrix'

  • If an expression is available, then it should be usable.
  • If it isn't available, then it shouldn't be listed as available.

Extension version: 0.27.1
VS Code version: Code 1.98.0 (Universal) (6609ac3d66f4eade5cf376d1cb76f13985724bcb, 2025-03-04T21:06:18.612Z)
OS version: Darwin arm64 24.3.0
Modes:

System Info
Item Value
CPUs Apple M1 Max (10 x 2400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 7, 9, 10
Memory (System) 64.00GB (0.87GB free)
Process Argv --crash-reporter-id 1fc67ee2-0174-4598-9f98-4537df0dd32c
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vscod805cf:30301675
binariesv615:30325510
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
vscrp:30673768
962ge761:30959799
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dwnewjupytercf:31046870
nativerepl2:31139839
pythonrstrctxt:31112756
nativeloc2:31192216
iacca1:31171482
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
5a9hg449:31230677
hdaa2157:31222309
copilot_t_ci:31222730
jda6j935:31233686

Ngôn ngữ chính
TypeScript
Star
661
Fork
214
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

Mở 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 github/vscode-github-actions

Tất cả issue của github/vscode-github-actions

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.