Qwertie
Qwertie

Reputation: 6493

GitHub equivelant to GitLab review apps

GitLab has an extremely useful feature called Review Apps which allows you to start up an instance of the web app from every PR which has its own subdomain and is linked on the PR page. I have done some searching and I don't see anything quite like it for GitHub.

Are there any ways to achieve a similar thing on github? 3rd party services are fine if they can integrate in with github. The app has a docker compose config so it would be just starting up an instance on a VM and shutting it down later.

Upvotes: 2

Views: 1610

Answers (1)

VonC
VonC

Reputation: 1324178

The closest would be Delivering deployments/Deployment API, as described in the article "Deploy your pull requests with GitHub Actions and GitHub Deployments" from Sander Knape.

https://sanderknape.com/images/github_deployments_finished.png

You can see its workflow here.

But the point is: there is not a directly integrated "review" deployment process like GitLab: you need to write your own GitHub workflow in order to deploy on a GitHub-managed Azure-based server, starting with:

  deploy:
    runs-on: ubuntu-latest
    needs: deploy-check
    if: needs.deploy-check.outputs.triggered == 'true'
    steps:
      - name: get pull request ref
        id: get_pull_request_ref
        uses: octokit/[email protected]
        with:
          route: GET /repos/:repository/pulls/:issue_id
          repository: ${{ github.repository }}
          issue_id: ${{ github.event.issue.number }}
        env:
          GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

Upvotes: 3

Related Questions