mirror of
https://github.com/nektos/act.git
synced 2026-04-26 17:35:49 +03:00
[GH-ISSUE #2135] Research about actions/upload-artifact@v4 and actions/download-artifact@v4 #1016
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#1016
Loading…
Add table
Add a link
Reference in a new issue
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?
Originally created by @ChristopherHX on GitHub (Dec 19, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/2135
Decompiled proto for artifacts from toolkit only typescript sources provided by GitHub.
Source
Notice, this was decompiled by bing chatbot and only required include fixes
You can do it yourself using that prompt and place classes as long they don't hit the content length. I have converted multiple times to get the final list of all Messages.
Update 2024-02-17: Delete Artifact Endpoint proto
@ChristopherHX commented on GitHub (Dec 19, 2023):
Hmm they are not using protobuf in the toolkit yet, but the code exists
They use the json representation of protobuf and not the binary protocol.
@ChristopherHX commented on GitHub (Dec 20, 2023):
Only the origin of
ACTIONS_RESULTS_URLis used so if it contains a baseurl path that is ignored.Base url is always
/twirp/github.actions.results.api.v1.ArtifactServiceof a user specified origin. Both http/https and port of the origin are preserved.ACTIONS_RUNTIME_TOKENmust be a jwt token with claimscpcontaining aActions.Results:{runid}:{jobId}value (replace{runid}and{jobId}with an id or guid, that is passed in each api requestGHES and GITEA are blocked by the current toolkit code and won't work as of now.
Gitea would have to switch to jwt tokens if they would want to support artifacts v4 from GitHub as soon it is allowed in GHES
@TWiStErRob commented on GitHub (Jan 26, 2024):
@ChristopherHX what's the current state of
...-artifact@v4support in act? and what are the steps required to get there?When using new version, I'm getting
which is consistent with your findings about jwt tokens above.
@ChristopherHX commented on GitHub (Jan 26, 2024):
0%
in gitea 80%, it's also in go so not that much to fear.
We could port https://github.com/go-gitea/gitea/compare/main...ChristopherHX
gitea-artifacts-v4 to act.
My time is currently limited due to exam period.
ACTIONS_RUNTIME_TOKEN has never been set by act itself...
@zdenardi commented on GitHub (Feb 5, 2024):
I'm still getting
::error::Invalid token specified: Cannot read properties of undefined (reading 'replace')Any update on this?
@JoshMcCullough commented on GitHub (Apr 10, 2024):
Also seeing this with
upload-artifact@v4-- any fix?@ChristopherHX commented on GitHub (Apr 10, 2024):
The fix is https://github.com/nektos/act/pull/2224, but it doesn't meet the 50% (has 40%) coverage requirement of this project. Due to unused generated code of google protobuf.
go-gitea/gitea requirements are not that strict and it has been merged months ago
@JoshMcCullough commented on GitHub (Apr 10, 2024):
@ChristopherHX thanks for your work on this, and for the update.
@rorycl commented on GitHub (May 1, 2024):
I think I've hit the same issue on act version 0.2.62:
This workflow works fine on github.
@rorycl commented on GitHub (May 20, 2024):
Hi @ChristopherHX. Thanks very much for the note about the JWT token to fix the problem with
artifacts-component. That seems to work fine.However, running on e1e5671 I'm getting a related error:
Unable to get the ACTIONS_RESULTS_URL env variable.I'm invoking
actas follows:(That jwt has the contents you suggested, see jwt.io).
Apologies if I've missed something here. Let me know if I should file a new issue or specify an ACTIONS_RESULTS_URL in the environment.
Extract from output:
@ChristopherHX commented on GitHub (May 20, 2024):
I don't know what you are doing..... this is missing a dash (-)
And doing
--env ACTIONS_RUNTIME_TOKENis a very bad ideaFor me it works like that
test.ymlis from my comment in the PR.--env GITHUB_REPOSITORY=me/meis only there because I didn't have any valid repo at my pwd@ChristopherHX commented on GitHub (May 20, 2024):
Also if
ACTIONS_RUNTIME_TOKENis not a JWT, you might be using a different version of act than you claim to be using@rorycl commented on GitHub (May 21, 2024):
Thanks very much for your response, @ChristopherHX . Apologies, the missing hyphen was the problem.
I can confirm that
runs successfully from a fresh compilation from e1e5671 and from the latest artifact run on linux amd64.
For anyone needing a jwt, please see the comment concerning making jwt with the contents
for example this one.
@TWiStErRob commented on GitHub (May 21, 2024):
With the PR merged, do we still need to manually mint a JWT? Shouldn't act be doing that internally?
@rorycl commented on GitHub (May 21, 2024):
You are right, @TWiStErRob
~/go/bin/act --artifact-server-path=/tmp/artifactswithout a jwt worked for me on a local test run, with act on e1e5671.Apologies for the noise.
@tokidoki11 commented on GitHub (May 22, 2024):
sorry is there any release ETA?
@ChristopherHX commented on GitHub (May 22, 2024):
I didn't even create this as a feature request, this issue contains much technical details for implementing the feature from scratch. Therefore are references to the jwt format or the google protobuf file part of this issue, all of them are mostly irrelevant for users of the act executable.
Nobody prevents you from downloading the executable associated with all Pullrequests that are merged from the GitHub Artifact List or just clone or doing a
go build.@JoshMcCullough commented on GitHub (Feb 7, 2025):
Shouldn't generated code be exclude from coverage?
@ChristopherHX commented on GitHub (Feb 7, 2025):
Yes this has been done in 2024 before it has been merged