An action that deletes an artifact associated with given workflow.

Overview

Contributors Forks Stargazers Issues MIT License


GitHub Action to delete workflow artifact(s)

An action that deletes an artifact associated with given workflow.
Report Bug · Request Feature

Description

Let's suppose you have a workflow with a job in it that at the end uploads an artifact using actions/upload-artifact action and you want to download this artifact in another workflow using dawidd6/action-download-artifact. After downloading the artifact and doing something with the artifact (like deploying something to GitHub Pages), you may want to clean up the workflow artifact to stay within storage cost restrictions. This GitHub Actions helps with that.

Usage

  cleanup-artifacts:
    name: Job to clean up old artifacts
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Remove artifact
        uses: philips-labs/[email protected]
        with:
          # Optional, GitHub token, a Personal Access Token with `repo` scope if needed
          # Required, if artifact is from a different repo
          # Required, if repo is private a Personal Access Token with `repo` scope is needed
          github_token: ${{secrets.GITHUB_TOKEN}}
          # Required, workflow file name or ID
          workflow: workflow-name.yml
          # Optional, uploaded artifact name,
          # will delete all artifacts if not specified
          name: artifact.json
          # Optional, the status or conclusion of a completed workflow to search for
          # Can be one of a workflow conclusion:
          #   "failure", "success", "neutral", "cancelled", "skipped", "timed_out", "action_required"
          # Default is set to success
          workflow_conclusion: success

Example

name: Deploy Portal 

on:
  workflow_run:
    branches:
      - main
    workflows: ["Deployment"]
    types:
      - completed
  workflow_dispatch:

jobs:
  cleanup-artifacts:
    name: Job to clean up old artifacts
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Download artifact
        uses: philips-labs/[email protected]
        with:
          workflow: crawl.yml
          name: repos.json

Contributing

If you have a suggestion that would make this project better, please fork the repository and create a pull request. You can also simply open an issue with the tag "enhancement".

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgments

This project is inspired by:

You might also like...

A custom action for setting GitHub Workflow environment variables with YAML configuration files.

yaml-env-action - A custom action for setting GitHub Workflow environment variables with YAML configuration files. Introduction yaml-env-action is a c

Dec 13, 2022

⚡️ A resource to help figure out what JavaScript array method would be best to use at any given time

JavaScript Array Explorer When I was first learning array methods, I spent a lot of time digging through the docs to find the appropriate one, and I h

Jan 2, 2023

Converts geojson to svg string given svg viewport size and maps extent.

geojson2svg Converts geojson to svg string given svg viewport size and maps extent. Check world map, SVG scaled map and color coded map examples to de

Dec 17, 2022

CASL is an isomorphic authorization JavaScript library which restricts what resources a given user is allowed to access

CASL is an isomorphic authorization JavaScript library which restricts what resources a given user is allowed to access

CASL (pronounced /ˈkæsəl/, like castle) is an isomorphic authorization JavaScript library which restricts what resources a given user is allowed to ac

Dec 31, 2022

Open the GitHub page of the given or current directory repo

gh-home Open the GitHub page of the given or current directory repo It will attempt to open the upstream repo if there is one or the forked repo. Inst

Dec 17, 2022

List of all swags given out by various companies for Hacktoberfest 2021

List of all swags given out by various companies for Hacktoberfest 2021

Hacktoberfest 2021 Swag List Hacktoberfest is the celebration of Open-Source, its that time of the year when people from all over the world come toget

Dec 18, 2022

A util for getting data and metadata for all markdown files in a given dir. Useful for building static site generators

extract-md-data A util for getting data and metadata for all markdown files in a given dir. Useful for building static site generators. Usage Given th

Jan 6, 2022

A Twitter bot that tweets all ERC-721 NFT sales for a given contract 🤖

NFT Sales Twitter Bot 🤖 This was made to succeed my Opensea Sales Twitter Bot repo; while relying on the OpenSea Events API is simpler, it doesn't in

Jan 2, 2023

A discord bot that monitors the LavaLink nodes given, and updates it via an embed on discord.

A discord bot that monitors the LavaLink nodes given, and updates it via an embed on discord.

LavaLink-Node-Monitor-for-Discord This Bot will help you monitor multiple LavaLink nodes directly on discord [Updates Every 30 Seconds] Setting Up The

Apr 2, 2022

In game dev, generative art, and creative coding, sine is a ubiquitous function that is often used as a spring-like oscillator for a given parameter.

In game dev, generative art, and creative coding, sine is a ubiquitous function that is often used as a spring-like oscillator for a given parameter.

In game dev, generative art, and creative coding, sine is a ubiquitous function that is often used as a spring-like oscillator for a given parameter.

Feb 22, 2022

Simple string diffing. Given two strings, striff will return an object noting which characters were added or removed, and at which indices

Simple string diffing. Given two strings, striff will return an object noting which characters were added or removed, and at which indices

Jan 6, 2023

A Leaderboard that shows who has given your stars to your repositories

A Leaderboard that shows who has given your stars to your repositories

A Leaderboard that shows who has given your stars to your repositories

Mar 22, 2022

This package will generate n numbers of thumbnails at different position in a given video file.

This package will generate n numbers of thumbnails at different position in a given video file.

About Generate n numbers of Image thumbnails of a video file. !Live Demo code sandbox example video-thumbnail-generate.mp4 This package can be used wi

Dec 20, 2022

This package will generate n numbers of thumbnails at different positions in a given video file.

This package will generate n numbers of thumbnails at different positions in a given video file.

The smallest library to generate video thumbnails on client side. About Generate n numbers of Image thumbnails of a video file. !Live Demo code sandbo

Dec 20, 2022

Given a list of items, only render what's visible on the screen while allowing scrolling the whole list.

Solid Windowed Given a list of items, only render what's visible on the screen while allowing scrolling the whole list. A Solid component. See https:/

Dec 21, 2022

This tool uses native browser APIs to take screenshots of a given web page, tab, window, or the user's entire screen.

This tool uses native browser APIs to take screenshots of a given web page, tab, window, or the user's entire screen.

This tool uses native browser APIs to take screenshots of a given web page, tab, window, or the user's entire screen.

Jan 1, 2023

Tiny and fast utility to extract all possible values for a given enum.

Tiny (208B) and fast utility to extract all possible values for a given enum.

Apr 18, 2022

Script to fetch all NFT owners using moralis API. This script output is a data.txt file containing all owner addresses of a given NFT and their balances.

Script to fetch all NFT owners using moralis API. This script output is a data.txt file containing all owner addresses of a given NFT and their balances.

🔎 Moralis NFT Snapshot Moralis NFT API will only return 500 itens at a time when its is called. For that reason, a simple logic is needed to fetch al

Jun 23, 2022

Creates code review tasks from given member list to Clickup.

What is codeReview and what it does? What is codeReivewer: codeReviewer is a helper tool that helps me to create code review tasks inside of ClickUp a

Jul 5, 2022
Comments
  • Bump @actions/core from 1.3.0 to 1.9.1

    Bump @actions/core from 1.3.0 to 1.9.1

    Bumps @actions/core from 1.3.0 to 1.9.1.

    Changelog

    Sourced from @​actions/core's changelog.

    1.9.1

    • Randomize delimiter when calling core.exportVariable

    1.9.0

    • Added toPosixPath, toWin32Path and toPlatformPath utilities #1102

    1.8.2

    • Update to v2.0.1 of @actions/http-client #1087

    1.8.1

    • Update to v2.0.0 of @actions/http-client

    1.8.0

    1.7.0

    1.6.0

    1.5.0

    1.4.0

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Inputs in `action.yml` don't match `main.js`

    Inputs in `action.yml` don't match `main.js`

    From looking at the code, one can specify run_id, but that's not mentioned in action.yml. Also, the input workflow is not actually required when specifying run_id, but action.yaml say so.

    opened by LukasKalbertodt 1
  • Bump node-fetch from 2.6.1 to 2.6.7

    Bump node-fetch from 2.6.1 to 2.6.7

    Bumps node-fetch from 2.6.1 to 2.6.7.

    Release notes

    Sourced from node-fetch's releases.

    v2.6.7

    Security patch release

    Recommended to upgrade, to not leak sensitive cookie and authentication header information to 3th party host while a redirect occurred

    What's Changed

    Full Changelog: https://github.com/node-fetch/node-fetch/compare/v2.6.6...v2.6.7

    v2.6.6

    What's Changed

    Full Changelog: https://github.com/node-fetch/node-fetch/compare/v2.6.5...v2.6.6

    v2.6.2

    fixed main path in package.json

    Commits
    • 1ef4b56 backport of #1449 (#1453)
    • 8fe5c4e 2.x: Specify encoding as an optional peer dependency in package.json (#1310)
    • f56b0c6 fix(URL): prefer built in URL version when available and fallback to whatwg (...
    • b5417ae fix: import whatwg-url in a way compatible with ESM Node (#1303)
    • 18193c5 fix v2.6.3 that did not sending query params (#1301)
    • ace7536 fix: properly encode url with unicode characters (#1291)
    • 152214c Fix(package.json): Corrected main file path in package.json (#1274)
    • See full diff in compare view
    Maintainer changes

    This version was pushed to npm by endless, a new releaser for node-fetch since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Releases(v1.0.0)
  • v1.0.0(Jan 5, 2022)


    GitHub Action to delete workflow artifact(s)

    An action that deletes an artifact associated with given workflow.
    Report Bug · Request Feature

    Description

    Let's suppose you have a workflow with a job in it that at the end uploads an artifact using actions/upload-artifact action and you want to download this artifact in another workflow using dawidd6/action-download-artifact. After downloading the artifact and doing something with the artifact (like deploying something to GitHub Pages), you may want to clean up the workflow artifact to stay within storage cost restrictions. This GitHub Actions helps with that.

    Usage

      cleanup-artifacts:
        name: Job to clean up old artifacts
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v2
    
          - name: Remove artifact
            uses: philips-labs/[email protected]
            with:
              # Optional, GitHub token, a Personal Access Token with `repo` scope if needed
              # Required, if artifact is from a different repo
              # Required, if repo is private a Personal Access Token with `repo` scope is needed
              github_token: ${{secrets.GITHUB_TOKEN}}
              # Required, workflow file name or ID
              workflow: workflow-name.yml
              # Optional, uploaded artifact name,
              # will delete all artifacts if not specified
              name: artifact.json
              # Optional, the status or conclusion of a completed workflow to search for
              # Can be one of a workflow conclusion:
              #   "failure", "success", "neutral", "cancelled", "skipped", "timed_out", "action_required"
              # Default is set to success
              workflow_conclusion: success
    

    Example

    name: Deploy Portal 
    
    on:
      workflow_run:
        branches:
          - main
        workflows: ["Deployment"]
        types:
          - completed
      workflow_dispatch:
    
    jobs:
      cleanup-artifacts:
        name: Job to clean up old artifacts
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v2
    
          - name: Download artifact
            uses: philips-labs/[email protected]
            with:
              workflow: crawl.yml
              name: repos.json
    

    Contributing

    If you have a suggestion that would make this project better, please fork the repository and create a pull request. You can also simply open an issue with the tag "enhancement".

    1. Fork the Project
    2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
    3. Commit your Changes (git commit -m 'Add some AmazingFeature')
    4. Push to the Branch (git push origin feature/AmazingFeature)
    5. Open a Pull Request

    License

    Distributed under the MIT License. See LICENSE for more information.

    Acknowledgments

    This project is inspired by:

    Source code(tar.gz)
    Source code(zip)
Owner
Philips Labs
Philips Labs - Projects in development
Philips Labs
A TurboRepo local cache server which uploads artifact cache to GH artifacts.

TurboRepo Github Artifacts action This action allows you use Github artifacts as TurboRepo remote cache server. How it works? It's starts a local Turb

Felix Mosheev 65 Dec 18, 2022
BookStore is a website that allows a given user to view a list of books, to add a new book and remove a given book.

Project Name : BookStore CMS BookStore is a website that allows a given user to view a list of books, to add a new book and remove a given book. In or

Chris Siku 10 Aug 22, 2022
Workflow to re-trigger workflow of all open PRs when base updates

Workflow to re-trigger workflow of all open PRs when base updates

James Tan 4 Aug 28, 2022
A GitHub app to report failed workflow job actions and notify pull request creator with custom report message for the failed workflow job.

Workflow Reporter A GitHub App built with Probot that reports failed workflow job actions and notify the pull request creator with custom report messa

Divyanshu Shekhar 14 Nov 12, 2022
A Zotero add-on that scans your Markdown reading notes, tags the associated Zotero items, and lets you open notes for the Zotero items in Obsidian.

Zotero Obsidian Citations Adds colored tags to Zotero items that have associated Markdown notes stored in an external folder. Open an associated Markd

Dae 210 Jan 4, 2023
A UI for burning Solana NFTs and geting back $SOL from the associated token account

A UI for burning Solana NFTs and geting back $SOL from the associated token account

null 14 Oct 9, 2022
Minty is an example of how to mint non-fungible tokens (NFTs) while storing the associated data on IPFS

Minty is an example of how to mint non-fungible tokens (NFTs) while storing the associated data on IPFS. You can also use Minty to pin your data on an IPFS pinning service such as nft.storage and Pinata.

One & Zeros 10 Nov 12, 2022
The ManageYourCompany 📈 project is a project that creates, deletes, updates companies, units and assets.

The ManageYourCompany ?? project is a project that creates, deletes, updates companies, units and assets. The rule is that every company has several units and the units have several assets, these assets are machines with several fields: Name, status, person in charge, image, among others... This is a project in order to exercise my Backend skills with NodeJs and front with react.

Bruno da Silva Leite 2 Feb 9, 2022
A vite plugin that deletes console.log in the production environment

vite-plugin-remove-console A vite plugin that deletes console.log in the production environment English | 中文 Install npm install vite-plugin-remove-co

啝裳 49 Dec 22, 2022
This is a project that add, stores and deletes current book in the library

Project Name Awesome books: with ES6 Description the project. In this project, I restructured my Awesome books app code. The goal was to make it more

Harrison Njuguna 5 Nov 11, 2022