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

Showing error when using >> "$GITHUB_ENV" #199

Closed
Martin-Carlsson opened this issue May 21, 2023 · 2 comments
Closed

Showing error when using >> "$GITHUB_ENV" #199

Martin-Carlsson opened this issue May 21, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@Martin-Carlsson
Copy link

Describe the bug
After updating code to adhere to GitHub Actions: Deprecating save-state and set-output commands vscode-github-actions started to show errors in code.

To Reproduce

      - name: Read Python version from .python-version
        run: echo "python_version=$(cat .python-version)" >>  "$GITHUB_ENV"

      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: ${{ env.python_version }}

Expected behavior
No errors.

Screenshots

The error:
image

The GitHub Action log showing the code runs without problems:
image

Extension Version
v0.25.7

Additional context
VSCode version: 1.79.0-insider

I am using Visual Studio Code Dev Containers

The action is running fine as a GitHub Action.

The entire code, for context

name: YAMLLint

on:
  pull_request:
    paths:
      - '**.yaml'
      - '**.yml'

jobs:
  lint:
    runs-on: ubuntu-latest

    steps:
      - name: Check out repository
        uses: actions/checkout@v3

      - name: Read Python version from .python-version
        run: echo "python_version=$(cat .python-version)" >>  "$GITHUB_ENV"

      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: ${{ env.python_version }}

      - name: Install yamllint
        run: |
          python -m pip install --upgrade pip
          grep yamllint requirements.txt | xargs -n 1 pip install

      - name: Lint YAML files
        run: |
          git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
          git ls-files --exclude-standard --cached --others -- '*.yaml' '*.yml' | xargs yamllint
@muzimuzhi
Copy link

duplicate of #47

@Martin-Carlsson
Copy link
Author

Duplicate

@github-project-automation github-project-automation bot moved this from Backlog 🗒 to Done 💤 in GitHub Actions VS Code Extension May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants