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

Failed to create PR with aborted: you must first push the current branch to a remote, or use the --head flag #313

Closed
kachick opened this issue Jan 8, 2025 · 10 comments
Labels
bug Something isn't working

Comments

@kachick
Copy link
Owner

kachick commented Jan 8, 2025

https://github.com/kachick/dotfiles/actions/runs/12661736199/job/35285463373

Run gh pr create --base 'main' --title 'Bump flake.lock and related dependencies' --body 'This PR has been created by reusable workflow in https://github.com/kachick/selfup/tree/main/.github/workflows
  gh pr create --base 'main' --title 'Bump flake.lock and related dependencies' --body 'This PR has been created by reusable workflow in https://github.com/kachick/selfup/tree/main/.github/workflows
  
  Do NOT work in the branch of this PR, it may be updated by the bot with force push.
  '
  shell: /usr/bin/bash -e {0}
  env:
    PR_BRANCH: bot-update-flake-lock
    DETERMINATE_NIX_KVM: [1](https://github.com/kachick/dotfiles/actions/runs/12661736199/job/35285463373#step:16:1)
    MAGIC_NIX_CACHE_DAEMONDIR: /home/runner/work/_temp/magic-nix-cache-b9f96e52-bd04-4de5-99c2-135b67593b11
    GITHUB_TOKEN: ***
aborted: you must first push the current branch to a remote, or use the --head flag
Error: Process completed with exit code 1.

Looks like related to cli/cli#10188

@kachick kachick added the bug Something isn't working label Jan 8, 2025
@kachick kachick added this to 🛸 Jan 8, 2025
@github-project-automation github-project-automation bot moved this to 🙋‍♂ in 🛸 Jan 8, 2025
kachick added a commit that referenced this issue Jan 8, 2025
To debug GH-313 easier
@kachick kachick moved this from 🙋‍♂ to 🍵 in 🛸 Jan 8, 2025
@kachick
Copy link
Owner Author

kachick commented Jan 8, 2025

Looks working now kachick/dotfiles#1031

Broken

  Version: 20250105.1.0
  Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20250105.1/images/ubuntu/Ubuntu2404-Readme.md

Fixed

  Version: 20250105.1.0
  Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20250105.1/images/ubuntu/Ubuntu2404-Readme.md

... why same 🤔

@kachick kachick closed this as completed Jan 8, 2025
@github-project-automation github-project-automation bot moved this from 🍵 to 🎉 in 🛸 Jan 8, 2025
@kachick
Copy link
Owner Author

kachick commented Jan 14, 2025

Also failed in other repositories

Should I pin gh version with nix even in action runner...? 🤔

@kachick kachick reopened this Jan 14, 2025
@github-project-automation github-project-automation bot moved this from 🎉 to 💪 in 🛸 Jan 14, 2025
@kachick
Copy link
Owner Author

kachick commented Jan 14, 2025

cli/cli#6485 (comment)

@kachick
Copy link
Owner Author

kachick commented Jan 14, 2025

@kachick
Copy link
Owner Author

kachick commented Jan 14, 2025

cli/cli@2358fce

We should wait for v2.65 will be used in the runner.

It just downloads latest https://github.com/actions/runner-images/blob/8184167b25da8b39c2abe26e415184a24464a0e7/images/ubuntu/scripts/build/install-github-cli.sh#L12-L14

So should I wait for next automated PR and merging, and applying it...? In my experience, github hosted runners takes much of the time for release iterations.

@kachick
Copy link
Owner Author

kachick commented Jan 14, 2025

actions/runner-images#11377 have the updates.

@kachick
Copy link
Owner Author

kachick commented Jan 14, 2025

Scheduled trigger is failing and workflow_dispatch is still working.

@kachick
Copy link
Owner Author

kachick commented Jan 14, 2025

An workaround is setting --head $(git branch --show-current), however it is much redandunt with the CLI spec

-H, --head <branch>
The branch that contains commits for your pull request (default [current branch])

Pining CLI version might be better to avoid similar problems for future.

@github-project-automation github-project-automation bot moved this from 💪 to 🎉 in 🛸 Jan 14, 2025
@kachick
Copy link
Owner Author

kachick commented Jan 14, 2025

Worked #314

Cleanup eb4da79

@kachick
Copy link
Owner Author

kachick commented Jan 14, 2025

Applying these changes required to be merged for each repository which is pinned with git tag 😩

kachick added a commit that referenced this issue Jan 14, 2025
For updating github action. See GH-313 for detail
kachick added a commit to kachick/dotfiles that referenced this issue Jan 14, 2025
To fix broken scheduled updater. See kachick/selfup#313 for detail
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
Status: 🎉
Development

No branches or pull requests

1 participant