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

actions/upload-artifact@v4 is not available #31256

Closed
xuegao-tzx opened this issue Jun 5, 2024 · 7 comments
Closed

actions/upload-artifact@v4 is not available #31256

xuegao-tzx opened this issue Jun 5, 2024 · 7 comments
Labels
topic/gitea-actions related to the actions of Gitea type/bug type/docs This PR mainly updates/creates documentation

Comments

@xuegao-tzx
Copy link

xuegao-tzx commented Jun 5, 2024

Description

This is the yml configuration:

- name: Upload build reports
        uses: actions/upload-artifact@v4
        with:
          name: assembleRelease
          compression-level: 9
          path: build/app/outputs/flutter-apk/app-release.apk

the error is:

With the provided path, there will be 1 file uploaded
::warning::Artifact upload failed with error: GHESNotSupportedError: @actions/artifact v2.0.0+, upload-artifact@v4+ and download-artifact@v4+ are not currently supported on GHES..%0A%0AErrors can be temporary, so please try again and optionally run the action with debug mode enabled for more information.%0A%0AIf the error persists, please check whether Actions is operating normally at [https://githubstatus.com](https://www.githubstatus.com).
::error::@actions/artifact v2.0.0+, upload-artifact@v4+ and download-artifact@v4+ are not currently supported on GHES.

Gitea Version

1.22.0

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

image

Git Version

git version 2.39.3 (Apple Git-146)

Operating System

MacOS 14 arm64

How are you running Gitea?

Installation from binary

Database

SQLite

@yp05327 yp05327 added the topic/gitea-actions related to the actions of Gitea label Jun 6, 2024
@yp05327
Copy link
Contributor

yp05327 commented Jun 6, 2024

see #28853

@xuegao-tzx
Copy link
Author

see #28853

I known,but in 1.22.0, it is mentioned that it can be used normally:

🚀 Actions Artifacts v4 backend ([#28965](https://github.com/go-gitea/gitea/pull/28965))
Now you can use the actions [actions/upload-artifact@v4](https://github.com/actions/upload-artifact) / [actions/download-artifact@v4](https://github.com/actions/download-artifact) to upload/download artifacts.

Thank you to [@ChristopherHX](https://github.com/ChristopherHX) for contributing this new protocol implementation.

@yp05327
Copy link
Contributor

yp05327 commented Jun 6, 2024

Yes, but

christopherhx/gitea-upload-artifact@v4 and christopherhx/gitea-download-artifact@v4 are removing the GHES error message until GitHub removes the not supported fatal error themself.

I don't like how GitHub blocks GHES using hardcoded asserts, until they support them officially

(#28853 (comment))

Needs both https://gitea.com/gitea/act_runner/pulls/473 and https://gitea.com/gitea/act_runner/pulls/471 on the runner side and patched actions/upload-artifact@v4 / actions/download-artifact@v4, like christopherhx/gitea-upload-artifact@v4 and christopherhx/gitea-download-artifact@v4, to not return errors due to GHES not beeing supported yet.

(#28965)

@lunny
I think we should update the change log.

@yp05327 yp05327 added the type/docs This PR mainly updates/creates documentation label Jun 6, 2024
@lunny
Copy link
Member

lunny commented Jun 6, 2024

Yes, but

christopherhx/gitea-upload-artifact@v4 and christopherhx/gitea-download-artifact@v4 are removing the GHES error message until GitHub removes the not supported fatal error themself.
I don't like how GitHub blocks GHES using hardcoded asserts, until they support them officially

(#28853 (comment))

Needs both https://gitea.com/gitea/act_runner/pulls/473 and https://gitea.com/gitea/act_runner/pulls/471 on the runner side and patched actions/upload-artifact@v4 / actions/download-artifact@v4, like christopherhx/gitea-upload-artifact@v4 and christopherhx/gitea-download-artifact@v4, to not return errors due to GHES not beeing supported yet.

(#28965)

@lunny I think we should update the change log.

Ah, yes. We should have a warning there.

@lunny
Copy link
Member

lunny commented Jun 15, 2024

I have sent https://gitea.com/gitea/blog/pulls/378 as a workaround.

@lunny lunny closed this as completed Jun 15, 2024
@serious-angel
Copy link

serious-angel commented Jul 30, 2024

Just to clarify, should it work in the latest Gitea? Currently, am getting the following:

(node:167) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Beginning upload of artifact content to blob storage
Uploaded bytes 8388608
Uploaded bytes 13653552
Finished uploading artifact content to blob storage!
SHA256 hash of uploaded artifact zip is 85fd1b2a3f7afd49e6fa65675e4838b0713aa9118a9bd63af0808a0984174331
Finalizing artifact upload
::error::Failed to FinalizeArtifact: Unexpected token 'E', "Error merge chunks%0A" is not valid JSON

It should be related to:

m.Post("FinalizeArtifact", r.finalizeArtifact)

func (r *artifactV4Routes) finalizeArtifact(ctx *ArtifactContext) {

Yet, currently, I am not sure what information is required be sent to investigate it further, and is it required to raise another issue at the repository.

The steps is the following:

    steps:
      # ...
      - name: 'Upload artifact archive'
        # uses: 'actions/upload-artifact@v3'
        uses: 'christopherhx/gitea-upload-artifact@v4'

        with:
          name: 'build-archive'
          retention-days: 1
          path: "${{ needs.environment-job.outputs.DEPLOYMENT_ARTIFACTS_DIRPATH }}/${{ needs.environment-job.outputs.DEPLOYMENT_ARTIFACT_ARCHIVE_FILENAME }}"
      # ...
    # ...
    steps:
      - name: 'Download build artifact'
        # uses: actions/download-artifact@v4
        uses: 'christopherhx/gitea-download-artifact@v4'

        with:
          name: 'build-archive'
          path: '${{ needs.environment-job.outputs.DEPLOYMENT_ARTIFACT_NAME }}'
    # ...

@ChristopherHX
Copy link
Contributor

This is issue #31354 chunks are not properly joined in their correct order

@go-gitea go-gitea locked as resolved and limited conversation to collaborators Sep 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/gitea-actions related to the actions of Gitea type/bug type/docs This PR mainly updates/creates documentation
Projects
None yet
Development

No branches or pull requests

5 participants