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

Failure on Gitea/Forgejo #117

Open
ketan-vijayvargiya opened this issue Jun 13, 2024 · 2 comments
Open

Failure on Gitea/Forgejo #117

ketan-vijayvargiya opened this issue Jun 13, 2024 · 2 comments

Comments

@ketan-vijayvargiya
Copy link

This Action fails with the following error on Forgejo (and I am guessing on Gitea as well):

Persisted git credentials restored
[command]/usr/bin/git config --global --unset safe.directory /workspace/ketan/nix-config
  ❓  ::endgroup::
::endgroup::
  ❌  Failure - Main Create PR
exitcode '1': failure
expression '${{ steps.create-pr.outputs.pull-request-number }}' rewritten to 'format('{0}', steps.create-pr.outputs.pull-request-number)'
evaluating expression 'format('{0}', steps.create-pr.outputs.pull-request-number)'
expression 'format('{0}', steps.create-pr.outputs.pull-request-number)' evaluated to '%!t(string=)'
  ⚙  ::set-output:: pull-request-number=
expression '${{ steps.create-pr.outputs.pull-request-operation }}' rewritten to 'format('{0}', steps.create-pr.outputs.pull-request-operation)'
evaluating expression 'format('{0}', steps.create-pr.outputs.pull-request-operation)'
expression 'format('{0}', steps.create-pr.outputs.pull-request-operation)' evaluated to '%!t(string=)'
  ⚙  ::set-output:: pull-request-operation=
  ❌  Failure - Main Update flake.lock
exitcode '1': failure

As you can see, it fails in the last step while trying to create a pull request. I think that's because a dependency - peter-evans/create-pull-request@v6 here - is hard coded to use GitHub and doesn't support Gitea/Forgejo. (See this issue on that project.)

Thunderbottom added a commit to Thunderbottom/flakes that referenced this issue Oct 28, 2024
Allow `nix flake update --commit-lock-file` to auto-commit the lock file
after the update.

This allows us to run `nix flake update` through CI without any external
dependencies, such as DeterminateSystems' GitHub actions workflow, while
also conforming to our commit messages standard. This decision was made
particularly because of an issue with `update-flake-lock` [1]

[1]: DeterminateSystems/update-flake-lock#117

Signed-off-by: Chinmay D. Pai <[email protected]>
@jiriks74
Copy link

I don't really believe that it's really related to this. I've forked this and changed the version to v7 (currently v7.0.5) and I get the following error:

Create or update the pull request
Attempting creation of pull request
::error::Not found.%0A

So far I wasn't able to get enough more information on why this fails. This happens with both the original version and my modified version. I'll try to get more information as I learn how GitHub Actions are created.

@jiriks74
Copy link

jiriks74 commented Dec 15, 2024

I was able to track down the issue!

The issue is upstream at https://github.com/peter-evans/create-pull-request

The action uses the wrong API URL for Forgejo/Gitea:

https://github.com/peter-evans/create-pull-request/blob/16e0059bfd236716f0191bfcfa63d9ded4cf325f/dist/index.js#L1287

The API endpoint is set to /api/v3 but the API endpoint for Forgejo/Gitea is /api/v1 so requests to /api/v3 result in a 404 and therefore error I mentioned above.

This issue is already reported upstream: peter-evans/create-pull-request#3569

If you want to get a working action until this gets fixed upstream and updated here you I've made a working workflow file:

https://forgejo.stefka.eu/jiriks74/nix.nvim/src/commit/12de97a2cde35cd1afc642853d8e617753680367/.github/workflows/update.yml

Note

Don't forget to modify the file to your liking. It's made for my use so you should probably change some things.

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

No branches or pull requests

2 participants