Giter Site home page Giter Site logo

delete-artifact's Introduction

CI Example

Delete artifacts

A GitHub Action for deleting artifacts within the workflow run. This can be useful when artifacts are shared across jobs, but are no longer needed when the workflow is complete.

✅ Compatibility

actions/upload-artifact geekyeggo/delete-artifact
@v1, @v2, @v3 @v1, @v2
@v4 @v4, @v5

Note

geekyeggo/delete-artifact@v4 has been deprecated in favour of geekyeggo/delete-artifact@v5 which removes the requirement of the token parameter.

⚡ Usage

See action.yml

Delete an individual artifact

steps:
    - name: Checkout
      uses: actions/checkout@v4

    - name: Create test file
      run: echo hello > test.txt

    - uses: actions/upload-artifact@v4
      with:
          name: my-artifact
          path: test.txt

    - uses: geekyeggo/delete-artifact@v5
      with:
          name: my-artifact

Specify multiple names

steps:
    - uses: geekyeggo/delete-artifact@v5
      with:
          name: |
              artifact-*
              binary-file
              output

🚨 Error vs Fail

By default, the action will fail when it was not possible to delete an artifact (with the exception of name mismatches). When the deletion of an artifact is not integral to the success of a workflow, it is possible to error without failure. All errors are logged.

steps:
    - uses: geekyeggo/delete-artifact@v5
      with:
          name: okay-to-keep
          failOnError: false

delete-artifact's People

Contributors

geekyeggo avatar jlarmstrongiv avatar s-weigand avatar

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.