Git Product home page Git Product logo

Comments (2)

gilzow avatar gilzow commented on July 30, 2024 1

It's a technique, but I'm not sure I would recommend it.

Bulk of the work is in this workflow: https://github.com/platformsh/platformsh-docs/blob/main/.github/workflows/build-from-fork.yaml

Essentially, for PRs from forks, we create a duplicate branch in the base repository from the fork's branch once the PR has been labeled as build-fork. We then push the duplicate to platform.sh and activate it as an environment. from then on, pushes to the PR are forced-pushed onto the cloned copy of the branch.

Once the PR is accepted, we have to handle deactivation and deletion of the cloned branch : https://github.com/platformsh/platformsh-docs/blob/main/.github/workflows/manage-environment.yaml#L72

It works but not without issues. Since we need to do things like add labels and comments, we have to run these workflows using the pull_request_target event instead of the pull_request event. This is potentially very dangerous. I'm not exactly happy with this setup as we have it but it's the best given our constraints.

from ddev.com.

bmartinez287 avatar bmartinez287 commented on July 30, 2024

https://developers.cloudflare.com/pages/platform/known-issues
"Commits/PRs from forked repositories will not create a preview. Support for this will come in the future."
I wonder what worked around they used for it.

from ddev.com.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.