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

[feat req] Option to persist zipped artifact to disk post-upload for reuse within the same workflow #622

Open
indy-singh opened this issue Sep 26, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@indy-singh
Copy link

indy-singh commented Sep 26, 2024

What would you like to be added?

persist-zip-to-disk: true (defaults to false)

Why is this needed?

We have a bunch of workflows that have to upload the zipped assets to S3 after we do actions/upload-artifact@v4. GH storage is for short term, S3 being for long term storage.

It would be great if we did not have to do this:-

    - name: Upload artifacts
      id: artifact-upload-step
      uses: actions/upload-artifact@v4
      with:
        name: ${{github.run_id}}
        path: .\publish
        retention-days: 2
        if-no-files-found: error

    - name: Create zip
      run: Compress-Archive -Path .\publish\* -DestinationPath publish.zip;

    - name: Configure AWS Credentials
      uses: aws-actions/configure-aws-credentials@v4
      with:
        role-to-assume: REDACTED
        aws-region: REDACTED

    - name: Upload zip to S3
      run: aws s3 cp publish.zip s3://REDACTED/example-dotnet-lambda/${{github.run_id}}.zip

But something like this instead:-

    - name: Upload artifacts
      id: artifact-upload-step
      uses: actions/upload-artifact@v4
      with:
        name: ${{github.run_id}}
        path: .\publish
        retention-days: 2
        if-no-files-found: error
        persist-zip-to-disk: true

    - name: Configure AWS Credentials
      uses: aws-actions/configure-aws-credentials@v4
      with:
        role-to-assume: REDACTED
        aws-region: REDACTED

    - name: Upload zip to S3
      run: aws s3 cp ${{ steps.artifact-upload-step.outputs.artifact-disk-location }} s3://REDACTED/REDACTED/${{github.run_id}}.zip

I did have a quick fish around the source, and it looks like the zipping operation is all kept in memory.

Obviously, I could just redownload the artifact but that feels wasteful as the zipped stream was just disposed of.

Cheers,
Indy

@indy-singh indy-singh added the enhancement New feature or request label Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant