Giter Club home page Giter Club logo

delete-artifact's People

Contributors

geekyeggo avatar jlarmstrongiv avatar s-weigand avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

delete-artifact's Issues

Default token is not read automatically

The Readme says

Support for actions/upload-artifact@v4 utilizes the GitHub REST API, and requires a permissive GITHUB_TOKEN ...

I'm assuming from GITHUB_TOKEN (environment variable) and from the current implementation that the token should be read automatically.

The most likely reason it is not however, is that the token is both required and has default set:

required: true
default: ${{ github.token }}

I ran into this recently in hashicorp/terraform-ls#1582

Even after adding the following to the workflow

permissions:
  actions: write

I was still getting the following error:

Error: Error: Parameter token or opts.auth is required

(which also happened to be ignored due to #20)

https://github.com/hashicorp/terraform-ls/actions/runs/7531206486/job/20499481014#step:2:9

Not all artifacts matching the glob are deleted

Context:
I am currently reworking a workflow to use with the v4 versions of upload/download-artifact and was relying heavily on adding content to artifacts before. So I settled for creating lots of unique little artifacts and combining them for the user at the very end of my workflow, where I use those tiny bits to generate a couple of reports. I use download-artifact to download all artifacts matching the pattern "testplan-", then I generate some reports from all the snippets and combine everything into an artifact "testplan". Afterwards, I want to delete everything matching "testplan-" to clean up.

Problem:
Some but not all artifacts matching the pattern are deleted. Example:

Run actions/download-artifact@v4
  with:
    pattern: testplan-*
    merge-multiple: true

downloads 32 artifacts, matching the various matrix runs. The subsequent

Run geekyeggo/delete-artifact@v4
  with:
    name: testplan-*
    useGlob: true
    failOnError: false

then deletes 18 of them, leaving the rest to dry. Do you have any idea, why this is happening?

Incorrect Disclaimer?

The disclaimer in your README states that this is using a preview version of GitHub's runtime API which is subject to change. I looked through the GitHub API docs but I didn't see anything there about the API being a preview or being unstable.

Am I just looking in the wrong place, or is the disclaimer incorrect?

Errored deletion does not fail by default

The Readme mentions:

By default, the action will fail when it was not possible to delete an artifact (with the exception of name mismatches).

This is not a behaviour we have recently observed:

https://github.com/hashicorp/terraform-ls/actions/runs/7531206486/job/20499481014#step:2:9

Run geekyeggo/delete-artifact@9d15d164b1dcd538ff1b1a2984bc2c0240986c3b
  with:
    name: provider-schema-data
    useGlob: true
    failOnError: true
  env:
    PKG_NAME: terraform-ls
Error: Error: Parameter token or opts.auth is required
Screenshot 2024-01-19 at 10 24 44

Assuming the intentions match with the documentation then I'd assume this is a bug.


Here is a full workflow definition: https://github.com/hashicorp/terraform-ls/blob/623f35c5a3019aa8c8a19fe067266b90095dc02e/.github/workflows/build.yml#L169-L175

I ran into this recently in hashicorp/terraform-ls#1580 when I did not realise that the new v4 version requires some additional permissions and I realised later it failed silently.

Artifacts are deleted from produced at run time but not from Github API

Hey There,

I'm facing a weird issue while using the action

      - name: Delete Build artifacts
        if: "!!steps.release.outputs.version"
        uses: geekyeggo/delete-artifact@v1
        with:
          name: |
            webhooks
            graphql

So in my CI.yml file I've this code snippet, which seems to work cause when I check the Artifacts section inside my Github Action, I don't see those artifacts. However, If I make a call to /repos/{owner}/{repo}/actions/artifacts I can still them listed there.
is there anything we could do about that? or is it how Github Actions Artifacts works?

Unable to delete artifacts uploaded by `actions/upload-artifact@v4`

An example workflow: https://github.com/muzimuzhi/hello-github-actions/actions/runs/7256001370

More comparisons can be found in muzimuzhi/hello-github-actions#24. It seems changes more than a naive package upgrading are needed (I'm not a front-end developer). Also the listArtifacts() function from @actions/artifact might be helpful.

Several breaking changes were introduced in actions/upload-artifact@v4, see

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.