Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Now checks for branch before pushing #80

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

evaherrada
Copy link
Contributor

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

@evaherrada evaherrada requested a review from ladyada July 9, 2020 19:05
@evaherrada evaherrada linked an issue Jul 9, 2020 that may be closed by this pull request
@per1234
Copy link
Contributor

per1234 commented Jul 9, 2020

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:

  • GITHUB_REPOSITORY - just needs to be changed to REPO_SLUG
  • GITHUB_REF - requires a translation to TRAVIS_BRANCH, which is necessary anyway to make the current script Travis-compatible.

@evaherrada
Copy link
Contributor Author

@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
Copy link
Contributor Author

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

@evaherrada
Copy link
Contributor Author

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

@evaherrada
Copy link
Contributor Author

evaherrada commented Jul 10, 2020

@evaherrada
Copy link
Contributor Author

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

@tekktrik
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gh-pages gets pushed to from branches
3 participants