Only deploy pull requests

Marcus's Avatar

Marcus

19 Dec, 2015 06:51 PM

Is is possible to run a deployment step only if it's a pull request or do I need to use a branch convention for that?

  1. Support Staff 1 Posted by Feodor Fitsner on 19 Dec, 2015 09:54 PM

    Feodor Fitsner's Avatar

    You can add a condition to deployment, something like:

    deploy:
    - provider: ...
      ...
      on:
        APPVEYOR_PULL_REQUEST_NUMBER: /\d+/
    
  2. Support Staff 2 Posted by Feodor Fitsner on 19 Dec, 2015 09:56 PM

    Feodor Fitsner's Avatar

    Oh, sorry, I've misread the question. Deployment is disabled for PRs, but you can allow deployment on PRs for private repositories only.

  3. 3 Posted by Marcus on 20 Dec, 2015 07:25 AM

    Marcus's Avatar

    Ok, so just to be clean, with a paid AppVeyor account I can deploy on PR:s, or do you mean a private GitHub repository?

  4. Support Staff 4 Posted by Feodor Fitsner on 20 Dec, 2015 07:29 AM

    Feodor Fitsner's Avatar

    I mean private GitHub repository.

    With public repo anyone can do a PR and cause deployment which is a security issue.

  5. 5 Posted by Marcus on 20 Dec, 2015 11:38 AM

    Marcus's Avatar

    That's true.

    Is it possible to add a condition like "only deploy open PR:s to the master branch" with a private repository?

  6. Support Staff 6 Posted by Feodor Fitsner on 20 Dec, 2015 07:25 PM

    Feodor Fitsner's Avatar

    Yes, you can add another condition:

      ...
      on:
        APPVEYOR_PULL_REQUEST_NUMBER: /\d+/
        branch: master
    
  7. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:03 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac