adafruit / ci-arduino

A script that will install all of the common dependencies for testing Arduino library builds using Github Actions
MIT License
115 stars 73 forks source link

Now checks for branch before pushing #80

Open evaherrada opened 4 years ago

evaherrada commented 4 years ago

Tested on BMP183.

In this case, we were on master and there were changes to commit, so it committed and pushed them to gh-pages. https://github.com/adafruit/Adafruit_BMP183_Library/runs/855278911?check_suite_focus=true#step:8:13

In this case we are on the branch I made to make the test PR from. As expected, it does not push to gh-pages https://github.com/adafruit/Adafruit_BMP183_Library/runs/855291221?check_suite_focus=true#step:8:13

per1234 commented 4 years ago

You might consider programmatically determining the name of the default branch, rather than hardcoding them. It's already possible to pick whichever default branch name you like and we might see an increase in diversity in the default branch names as people use their own preferences when renaming the existing branches named master.

There is an example of checking the default branch name in a Bash script here: https://github.com/arduino/actions/blob/4db348ad4928fedef8d23c21cd26fc23e0795037/libraries/compile-examples/entrypoint.sh#L124-L137

It does use some GitHub Actions-specific environment variables:

evaherrada commented 4 years ago

@per1234 Thanks for linking that. I'm doing a release sweep right now, but I'll integrate that into my script when I'm done

evaherrada commented 4 years ago

@per1234 Thanks! Looks like it's working. Now I've just got to get travis to pass

evaherrada commented 4 years ago

Well... That's odd. Not quite sure how this could fail on test platforms

evaherrada commented 4 years ago

Ah, looks like that's been happening for a while.

New CI runs https://github.com/adafruit/Adafruit_BMP183_Library/runs/858256767

https://github.com/adafruit/Adafruit_BMP183_Library/runs/858256947

evaherrada commented 4 years ago

Just putting a reminder here to release bmp183 after this gets merged

tekktrik commented 1 year ago

@evaherrada - is this still needed and/or relevant? If we've gotten along so far without this, is it worth pursuing still?