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

Maintenance: docs should not be published at each commit in a PR but only when merged #1053

Closed
dreamorosi opened this issue Aug 11, 2022 · 1 comment · Fixed by #1054
Closed
Assignees
Labels
automation This item relates to automation completed This item is complete and has been merged/shipped

Comments

@dreamorosi
Copy link
Contributor

Bug description

With the introduction of a new workflow architecture/design in #1023 the workflow that is supposed to be run on merge is now ran as a result of the successful execution of another workflow that runs every time a PR is updated. This is in the name of security and to avoid running privileged workflows directly on a code change that could come from a fork.

The changes introduced a faulty behaviour that causes the docs to be published every time any PR is updated, which should not be the case.

Expected Behavior

Docs to be published only when the PR is actually merged.

Current Behavior

Publish step runs all the time

image

Possible Solution

Add a guard in the publish job like this:

if: needs.get_pr_details.outputs.prIsMerged == 'true'

so that the job is run only when the PR is merged

Steps to Reproduce

Open a PR / update it / update it / ..

Environment

  • Powertools version used: main
  • Packaging format (Layers, npm): N/A
  • AWS Lambda function runtime: N/A
  • Debugging logs: N/A

Related issues, RFCs

#1023

@dreamorosi dreamorosi added bug Something isn't working automation This item relates to automation labels Aug 11, 2022
@dreamorosi dreamorosi self-assigned this Aug 11, 2022
@github-actions
Copy link
Contributor

⚠️ COMMENT VISIBILITY WARNING ⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@github-actions github-actions bot added the pending-release This item has been merged and will be released soon label Aug 15, 2022
@dreamorosi dreamorosi added completed This item is complete and has been merged/shipped and removed pending-release This item has been merged and will be released soon bug Something isn't working labels Nov 14, 2022
@dreamorosi dreamorosi changed the title Bug (build): docs should not be published at each commit in a PR but only when merged Maintenance: docs should not be published at each commit in a PR but only when merged Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation This item relates to automation completed This item is complete and has been merged/shipped
Projects
None yet
1 participant