If succesful build - git push

Maria's Avatar

Maria

27 Jan, 2015 03:48 PM

I'd like to push a new commit to github via appveyor.yml in case it's built succesfully. How can I do this?

  1. Support Staff 1 Posted by Feodor Fitsner on 27 Jan, 2015 05:19 PM

    Feodor Fitsner's Avatar

    You can put your git commands under on_success section:

    on_success:
      - do something
    

    But I guess your main question is how to authenticate?

  2. 2 Posted by Maria on 27 Jan, 2015 06:26 PM

    Maria's Avatar

    Indeed it is - via ssh?

    (my apologies for asking twice)

  3. Support Staff 3 Posted by Feodor Fitsner on 28 Jan, 2015 01:29 AM

    Feodor Fitsner's Avatar
  4. 4 Posted by Maria on 28 Jan, 2015 04:55 PM

    Maria's Avatar

    That's really useful, many thanks! :D

  5. 5 Posted by María on 03 Feb, 2015 03:48 PM

    María 's Avatar

    Hi Feodor,

    While using this feature I get this message:

     fatal: remote error: 
         You can't push to git://github.com/my_username/my_repo.git
         Use git@github.com:my_username/my_repo.git
    

    And can't guess what's going wrong. Can you help me?

  6. Support Staff 6 Posted by Feodor Fitsner on 03 Feb, 2015 04:29 PM

    Feodor Fitsner's Avatar

    Hi Maria,

    Update git remote to use https protocol.

    -Feodor

  7. 7 Posted by Maria on 04 Feb, 2015 10:05 AM

    Maria's Avatar

    Hi Feodor,

    But origin remote is already configured by the feature, isn't it?
    I can update it - but expected it to work straight.

    Thanks,

    Maria

  8. Support Staff 8 Posted by Feodor Fitsner on 04 Feb, 2015 03:07 PM

    Feodor Fitsner's Avatar

    There is "git" protocol by default but you need https.

    Also, make sure you have "[skip ci]" in your commit message to avoid creating an endless loop of builds, because when you push to the repo you cloned from a new build will be started. "[skip ci]" prevents that: http://www.appveyor.com/docs/how-to/skip-build

    -Feodor

  9. 9 Posted by Maria on 04 Feb, 2015 03:44 PM

    Maria's Avatar

    Yep - that's what I've done - everything is working perfectly, I was just wondering.
    skip ci has proved to be really useful indeed ^^

  10. Support Staff 10 Posted by Feodor Fitsner on 04 Feb, 2015 05:41 PM

    Feodor Fitsner's Avatar

    Great, thanks for the update!

  11. 11 Posted by joymon on 17 Jan, 2017 02:28 AM

    joymon's Avatar

    Seems the url below is not working. Should I need quotes for the message "[skip ci]"
     http://www.appveyor.com/docs/how-to/skip-build

  12. Support Staff 12 Posted by Feodor Fitsner on 17 Jan, 2017 02:29 AM

    Feodor Fitsner's Avatar

    No, just [skip ci] anywhere in the message

  13. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:14 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