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

non-Pull Request workflows causing warning and no plan is posted to the job summary #61

Closed
leuthelt opened this issue Apr 15, 2024 · 3 comments

Comments

@leuthelt
Copy link

Hello,

I'm using below GitHub Workflow configuration:

- name: Comment Terraform Plan results in PR and as job summary
  uses: liatrio/[email protected]
  with:
    json-file: ${{ env.WORKING_DIR }}/tfplan.json
    expand-comment: 'true'
    include-plan-job-summary: 'true'

Actual behaviour:
During a pull request everything works fine. Comments are posted to PR and job summary as well.
But when I'm running workflow in a non-pull request, I'm receiving following warnings:

Warning: Action doesn't seem to be running in a PR workflow context.
Warning: Skipping comment creation.

Expected behaviour:
Because README says "When include-plan-job-summary = true, if the action is executed in non-Pull Request workflows, the plan output will also be posted to the job summary of that run. If you do not wish to have this behavior, apply conditional logic to your workflow file.", I expect posting results to job summary during non-pull request.

Thanks for your help,
Thomas

@RobertKelly
Copy link
Contributor

Thanks. We will validate and get this updated.

@jburns24
Copy link
Contributor

jburns24 commented Sep 3, 2024

Validated this is a bug in v1.5.0 using the steps posted in this issue. Fix incoming

@jburns24
Copy link
Contributor

jburns24 commented Sep 3, 2024

@leuthelt This should be fixed in v1.6.0. The release notes on that version dont call out this bug being fixed as it was not in the title of the PR but the PR did address this issue and I tested it.

@jburns24 jburns24 closed this as completed Sep 3, 2024
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

3 participants