Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Possible permissions error preventing linguist-action environment variable output #4

Closed
HaydenMacDonald opened this issue May 9, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@HaydenMacDonald
Copy link

HaydenMacDonald commented May 9, 2022

Describe the bug

Linguist-action has stopped outputting data as environment variables, making the data inaccessible to other actions in a workflow.

Steps to Reproduce

  1. Run linguist-action in a workflow using the following configuration
      - name: Linguist Action
        uses: fabasoad/linguist-action@v1.0.2
        id: linguist
        with:
          path: './'
          percentage: true
  1. See error /linguist.rb:15:in 'new': repository path '/github/workspace/' is not owned by current user (Rugged::ConfigError) from /linguist.rb:15:in '<main>'

Expected behavior

The expectation is that linguist-action would output a environment variable that would be accessible to other actions in a workflow.

Actual behavior

There is no environment variable.

Screenshots

image

There is supposed to be a variable called REPO_LANGS (derived from ${{ steps.linguist.outputs.data }} in the workflow file below) in the with: section of the logs.

Technical information (please complete the following information)

  • OS: ubuntu-latest
  • linguist-action version 1.0.2
  • Full workflow:
name: multigitminder
on:
  push:
    branches: [ main, lang-bug ]
  issues:
    types: [ closed ]

jobs:
  multigitminder:
    runs-on: ubuntu-latest
    name: multigitminder
    steps:
      # Checkout
      - name: Checkout
        uses: actions/checkout@v2
      - name: "TODO to Issue"
        uses: "alstr/todo-to-issue-action@v2.4.1"
        id: "todo"
        with:
          TOKEN: ${{ secrets.GITHUB_TOKEN }}
          CLOSE_ISSUES: false
      # Linguist
      - name: Linguist Action
        uses: fabasoad/linguist-action@v1.0.2
        id: linguist
        with:
          path: './'
          percentage: true
      # multigitminder
      - name: multigitminder
        uses: HaydenMacDonald/multigitminder@v1.0.0
        id: multigitminder
        with:
          USERNAME: ${{ secrets.BEEMINDER_USERNAME }}
          AUTH_TOKEN: ${{ secrets.BEEMINDER_AUTH_TOKEN }}
          GOAL: multigitminder
          TARGET_LANGS: Python ## e.g. "['python', 'dockerfile', 'javascript']" or simply Python
          REPO_LANGS: ${{ steps.linguist.outputs.data }}
@HaydenMacDonald HaydenMacDonald added the bug Something isn't working label May 9, 2022
@fabasoad
Copy link
Owner

Hey @HaydenMacDonald! Thank you for opening this ticket. Please use fabasoad/setup-enry-action instead of this one as it is no longer maintained (I've added related warning). You shouldn't experience differences in output as enry uses the same library.

Also, here is the example with how to convert enry output to JSON format.

If you will have any troubles with fabasoad/setup-enry-action please open ticket in that repository. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants