Skip to content

fix(ci): only create local main branch if non-existent #164

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

Merged
merged 1 commit into from
Mar 17, 2025

Conversation

ARR4N
Copy link
Collaborator

@ARR4N ARR4N commented Mar 17, 2025

Why this should be merged

The CI job in #145 requires a local (to the runner) main branch and since actions/checkout doesn't check it out, the workflow creates the branch off origin/main. However, after merge of a PR to main, the workflow is run on main itself and that step fails because the branch already exists.

How this works

Only call git branch main origin/main if main doesn't exist.

How this was tested

We'll see once it's merged 🤷

@ARR4N ARR4N enabled auto-merge (squash) March 17, 2025 19:46
@ARR4N ARR4N requested a review from a team March 17, 2025 19:59
@ARR4N ARR4N merged commit 7b8d20f into main Mar 17, 2025
11 checks passed
@ARR4N ARR4N deleted the arr4n/fix-tooling-test-on-main-push branch March 17, 2025 20:00
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.

2 participants