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

Gitea action not working whenever gitea instance running under subpath #28763

Closed
Shakthijuego opened this issue Jan 11, 2024 · 8 comments
Closed
Labels

Comments

@Shakthijuego
Copy link

Description

My repo located at https://giteainstance.com/git/user/repo. Checkout action for gitea action failed with error
fatal: repository 'https:///giteainstance.com/user/repo/' not found

Gitea Version

1.21.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Behind nginx under subpath

Database

None

@lng2020
Copy link
Member

lng2020 commented Jan 12, 2024

reference actions/checkout#1242
actions/checkout just does not support the subpath yet.
maybe there is a fork of actions/checkout supports subpath?

@Shakthijuego
Copy link
Author

That seems the case. However just forking action/checkout doesn't seems to fix. Service prefix even being ignored in gitea action runner. Remote gitea action not being handled properly.

- name: Check out repository code with subpath
   uses: https://giteainstance.com/git/repo/checkout.git@v3

@lng2020
Copy link
Member

lng2020 commented Jan 12, 2024

I mean you may find someone fork actions/checkout repo and modify it to support the suburl feature.
for example https://gitea.com/ScMi1/checkout (I haven't tried this so I'm not sure it works)
However, I think this issue can be closed. Any further thoughts?

@Shakthijuego
Copy link
Author

Yes thank you. Checkout action got working with 'uses: ischanx/checkout@06c6114'
I will raise a separate issue for https://gitea.com/gitea/act_runner to support 'uses' command with subpath.

@Shakthijuego
Copy link
Author

For any ones reference: This code is responsible for ignoring subpath in action. (Search for newRemoteAction) https://gitea.com/gitea/act/src/branch/main/pkg/runner/step_action_remote.go

@ChristopherHX
Copy link
Contributor

This code is responsible for ignoring subpath in action

There is a problem when parsing that, it's simple not easy to find out what is meant.

You have a subpath as part of the uri, actions can reference a subfolder inside the repo.

Could mean both

  • repo: https://giteainstance.com/git/repo
    subfolder: /checkout.git
    version: v3
  • repo: https://giteainstance.com/git/repo/checkout.git (Ambiguous alternative interpretation)
    subfolder: /
    version: v3

Removing subfolder support (case 1) in Gitea Actions, would drop compat with GitHub Actions even more and allows the interpretation you want it to do.

@Shakthijuego
Copy link
Author

Agree. I am planning to remove subpath in gitea instance or make it work via redirecting in nginx. There seems no other solution.

Copy link

github-actions bot commented Mar 1, 2024

Automatically locked because of our CONTRIBUTING guidelines

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants