Pluralith / actions

A collection of GitHub Actions to run Pluralith in CI and automate infrastructure documentation generation
Mozilla Public License 2.0
26 stars 3 forks source link

Pluralith Comment - comment.md does not exist #11

Closed CloudMarshall closed 2 years ago

CloudMarshall commented 2 years ago

Issue with Pluralith Comment Github Action

Cannot see any reference to a comment.md file in the documentation.


    body-file: cloudmarshall//comment.md
    behavior: update
    github-token: ***
  env:
    AWS_DEFAULT_REGION: eu-west-1
    AWS_REGION: eu-west-1
    AWS_ACCESS_KEY_ID: ***
    AWS_SECRET_ACCESS_KEY: ***
    AWS_SESSION_TOKEN: ***
    PLURALITH_GITHUB_ACTION: true
Detected GitHub Actions
  Platform: github
  Project: CloudMarshall/proton-test
  Target type: pull-request
  Target ref: [25](https://github.com/CloudMarshall/proton-test/actions/runs/3280126355/jobs/5400529719#step:9:27)

Error: Error: body-file cloudmarshall//comment.md does not exist
DanThePutzer commented 2 years ago

Hi @CloudMarshall

Thanks for bringing it up! Will look into it and report back!

DanThePutzer commented 2 years ago

@CloudMarshall I can reproduce the issue, looking for a fix now :thumbsup:

DanThePutzer commented 2 years ago

Hi @CloudMarshall

I fixed the issue. It was actually an issue with the Github action rather than the CLI not outputting the file, but it should work again now.

I released a new set of actions, so you'll have to update from v1.1.0 to v1.2.0. Also, the CLI command for running Pluralith in CI has changed from pluralith run to pluralith run plan|apply|destroy. For this the run action now has a new input variable called terraform-command that you'll need to add. Here's an example of the complete run action as it looks now:

# Run Pluralith to generate an infrastructure diagram and comment body
- name: Pluralith Run
  uses: Pluralith/actions/run@v1.2.0
  with:
    terraform-command: "plan"
    terraform-path: "${{ env.working-directory }}/application"
    show-changes: true

Let me know if that works!

DanThePutzer commented 2 years ago

@CloudMarshall closing this since it should be fixed and I'm about to release a new version of the actions.