Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude ${{ insert }} from expression linter #349

Open
TheFox0x7 opened this issue Sep 3, 2023 · 0 comments
Open

Exclude ${{ insert }} from expression linter #349

TheFox0x7 opened this issue Sep 3, 2023 · 0 comments

Comments

@TheFox0x7
Copy link

on: push
jobs:
  _:
    strategy:
      matrix:
        os:
        - ubuntu-latest
        - macos-latest
        include:
        - os: ubuntu-latest # Only ubuntu-latest has an extra env var MYVAR
          env:
            MYVAR: myval
            MYVAR2: myval2
    env:
      SOME_ENV: B
      ${{ insert }}: ${{ matrix.env || fromjson('{}') }}
    runs-on: ${{ matrix.os }}
    steps:
    - run: env

This workflow currently returns error
job.yaml:16:11: undefined variable "insert". available variables are "env", "github", "inputs", "job", "matrix", "needs", "runner", "secrets", "steps", "strategy", "vars" [expression]

${{ insert }} is an undocumented expression which:

inserts a mapping into a mapping from an expression result.

Related discussion about the expression: go-gitea/gitea#24603 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant