cfn-lint-action icon indicating copy to clipboard operation
cfn-lint-action copied to clipboard

ERROR - Could not write the graph in DOT format.

Open hcdiekmann opened this issue 1 year ago • 1 comments

Describe the bug Using -g flag to generate DOT model gives missing pydot pygraphviz ERROR, although installed

To Reproduce

name: Lint CloudFormation Templates

on:
  push:
    branches:
      - main

jobs:
  cloudformation-linter:
    runs-on: ubuntu-latest

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

      - name: Setup Cloud Formation Linter with Latest Version
        uses: scottbrenner/cfn-lint-action@v2

      - name: Install pydot and pygraphviz
        run: |
          sudo apt-get install graphviz graphviz-dev
          pip install pygraphviz
          pip install pydot

      - name: Run Linter and generate DOT files
        run: |
          cfn-lint --version
          cfn-lint -g -t cloudformation/templates/*.yaml

      - name: Commit and push DOT files
        run: |
          git config --local user.email "[email protected]"
          git config --local user.name "GitHub Action"
          git add cloudformation/templates/*.dot
          git commit -m "Add generated DOT graph" || echo "No changes to commit"
          git push

Expected behavior Creates a file in the same directory as the template that models the template's resources in DOT format

Screenshots image

GitHub Actions Runner configuration (please complete the following information):

  • OS: ubuntu-latest

hcdiekmann avatar Oct 09 '23 04:10 hcdiekmann

Seems related to https://github.com/aws-cloudformation/cfn-lint/issues/1753, possibly https://github.com/ScottBrenner/cfn-lint-action/issues/274#issuecomment-1487140656 as well.

ScottBrenner avatar Oct 22 '23 03:10 ScottBrenner