Custom Action - "repository not found" | Support authentication for uses:
#285
Labels
No Label
kind
bug
kind
build
kind/compatible
kind
dependencies
kind
docs
kind
enhancement
kind
feature
kind
help wanted
kind
proposal
kind
refactor
related
act
related
environment
related
exec
related
gitea
related
workflow
reviewed
confirmed
reviewed
duplicate
reviewed
invalid
reviewed
needs feedback
reviewed
wontfix
reviewed
workaround
No Milestone
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/act_runner#285
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello!
I created an action template inside my Gitea instance. The repo is
organization/actions-sparse-checkout
, and it contains anaction.yml
file.Then, I'm trying to use it this way:
This workflow is in a repo on the same organization.
However, the "Set Up Job" step is failing with this:
The repository was initially
private
, but I've just changed that setting so it's visible.Now it's marked as
internal
.Then I made the Organization "Limited" (to authenticated users), and
internal
tag is now removed.And it's still failing for the same error.
Then I made Gitea fully available to public, and now I can access the repo through "Incognito" (on Chrome), but the action is still failing with "repository not found".
Any ideas what I'm doing wrong? :)
Thanks!
Actually, I'm seeing this:
I think it thinks "git" is the organization/user, and "organization" is the repo!
Alright.. I was able to work this around, by putting the link without "git/":
And by adding this instruction in the nginx config:
Obviously this is not ideal, and needs to be fixed,
but at least I'm not blocked for now :)
Thanks!
Just another note,
I was now trying to revert the other changes I made, by putting back
REQUIRE_SIGNIN_VIEW = true
,but I see that it breaks the work flow again, with:
I was trying to do this:
uses: https://${{ secrets.GITHUB_TOKEN }}@mydomain/organization/actions-sparse-checkout@main
But seems it just breaks the parsing, and the token doesn't get interpolated anyway, from what I can see.
It would be nice if we could keep our Gitea instance fully private, while being able to create custom actions like this.
I'll keep the Gitea instance public, including the repo of the action, for now.
Thank you!!
Could you please try
uses: https://${{ secrets.GITHUB_TOKEN }}:@mydomain/organization/actions-sparse-checkout@main
? There's a:
Thank you @wolfogre
That didn't seem to work:
Based on the logs, it seems that the
${{ }}
bit isn't being interpolated.I see, so act_runner/act doesn't support it.
Custom Action - "repository not found"to Custom Action - "repository not found" | Support authentication for `uses:`So gitea/act#75 adds support for gitea/act.
uses: https://${{ secrets.GITHUB_TOKEN }}:@mydomain/organization/actions-sparse-checkout@main
Wouldn't this leak the GITHUB_TOKEN once gitea/act_runner supports it? (see
Unless you modify gitea/act to not use the sanitized uses key as cache location.
Hi @ChristopherHX - thank you for your reply.
Both my Gitea and Act Runner are private and self-hosted.
The only reason I opened Gitea a bit now is because of this issue exactly, that I had to make the Action repo a public repo.
Apologies - I don't understand what you are referring to, here :)
Thank you again.
I'm responding to wolfogre's example. (I'm a nektos/act maintainer).
You shouldn't worry about implementation details of act, but storing the
${{secrets.GITHUB_TOKEN}}
in a folder name on your filesystem is suboptimal even if everything is private.Any unprivileged program may gain write access to your gitea via the token or other secrets, a public repo which should be private only gives read access.
Ah I get it!! Sorry.
Yeah, if the cache location would contain the GITHUB_TOKEN, that would be bad - I agree! :)
Thank for you remind, I'll make some improvements here.