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

Closed
opened 2025-11-02 10:31:10 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @xuegao-tzx on GitHub (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

Originally created by @xuegao-tzx on GitHub (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 <img width="1701" alt="image" src="https://github.com/go-gitea/gitea/assets/86029709/de48f1e1-3259-4353-89f1-6e836b582bb8"> ### Git Version git version 2.39.3 (Apple Git-146) ### Operating System MacOS 14 arm64 ### How are you running Gitea? [Installation from binary](https://docs.gitea.com/installation/install-from-binary) ### Database SQLite
GiteaMirror added the topic/gitea-actionstype/docstype/bug labels 2025-11-02 10:31:10 -06:00
Author
Owner

@yp05327 commented on GitHub (Jun 6, 2024):

see #28853

@yp05327 commented on GitHub (Jun 6, 2024): see #28853
Author
Owner

@xuegao-tzx commented on GitHub (Jun 6, 2024):

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.
@xuegao-tzx commented on GitHub (Jun 6, 2024): > see #28853 I known,but in [1.22.0](https://blog.gitea.com/release-of-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. ```
Author
Owner

@yp05327 commented on GitHub (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

(https://github.com/go-gitea/gitea/issues/28853#issuecomment-1905013276)

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 commented on GitHub (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 (https://github.com/go-gitea/gitea/issues/28853#issuecomment-1905013276) > 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.
Author
Owner

@lunny commented on GitHub (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 commented on GitHub (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)](https://github.com/go-gitea/gitea/issues/28853#issuecomment-1905013276)) > > > 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.
Author
Owner

@lunny commented on GitHub (Jun 15, 2024):

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

@lunny commented on GitHub (Jun 15, 2024): I have sent https://gitea.com/gitea/blog/pulls/378 as a workaround.
Author
Owner

@serious-angel commented on GitHub (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:

75d0b61546/routers/api/actions/artifactsv4.go (L142)

75d0b61546/routers/api/actions/artifactsv4.go (L328-L328)

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 }}'
    # ...
@serious-angel commented on GitHub (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: https://github.com/go-gitea/gitea/blob/75d0b61546e00390afdd850149de525dd64336a5/routers/api/actions/artifactsv4.go#L142 https://github.com/go-gitea/gitea/blob/75d0b61546e00390afdd850149de525dd64336a5/routers/api/actions/artifactsv4.go#L328-L328 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: ```yaml 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 }}" # ... ``` ```yaml # ... 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 }}' # ... ```
Author
Owner

@ChristopherHX commented on GitHub (Jul 31, 2024):

This is issue https://github.com/go-gitea/gitea/issues/31354 chunks are not properly joined in their correct order

@ChristopherHX commented on GitHub (Jul 31, 2024): This is issue https://github.com/go-gitea/gitea/issues/31354 chunks are not properly joined in their correct order
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13105