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

AWS Upload workflow should recognise that master and main are both default branches in repos #61

Open
mfitz opened this issue Dec 18, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@mfitz
Copy link
Contributor

mfitz commented Dec 18, 2024

There is some logic in the AWS Upload workflow that creates a file called release_name if the triggering push is for a non-default branch, which is determined by checking the branch name against refs/heads/main.

Some older repos still use refs/heads/master as the default branch name (the previous default in GitHub), so the conditional should also include a check against that name.

@mfitz mfitz added the bug Something isn't working label Dec 18, 2024
@mfitz mfitz changed the title AWS Upload workflow should recognise that master and main are both main branches in repos AWS Upload workflow should recognise that master and main are both default branches in repos Dec 18, 2024
@KasiaKoz
Copy link

How about, instead of main and master, we introduce a variable that defaults to main and can be configured if the repo has a different default branch?

@mfitz
Copy link
Contributor Author

mfitz commented Dec 19, 2024

How about, instead of main and master, we introduce a variable that defaults to main and can be configured if the repo has a different default branch?

Yep, that works. You can crib that from this previous PR.

@mfitz
Copy link
Contributor Author

mfitz commented Dec 19, 2024

There's also a variable in GitHub Actions that looks like it gives you the default branch name @KasiaKoz. I haven't tried this, but look into it; if it works, that's the cleanest solution, I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants