Skip to content

Commit

Permalink
Add pattern input
Browse files Browse the repository at this point in the history
  • Loading branch information
joutvhu committed Jan 20, 2024
1 parent 3189247 commit 9106fe5
Show file tree
Hide file tree
Showing 7 changed files with 211 additions and 141 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ This GitHub Action to delete artifacts from your build. This can be useful when

See also [upload-artifact](https://github.com/actions/upload-artifact).

## v2 - What's new
## Compatibility

> [!IMPORTANT]
> delete-artifact@v2 is not currently supported on GHES yet. If you are on GHES, you must use [v1](https://github.com/joutvhu/delete-artifact/releases/tag/v1).
If the artifacts are uploaded using actions/upload-artifact@v3- then use joutvhu/delete-artifact@v1

If the artifacts are uploaded using actions/upload-artifact@v4+ then use joutvhu/delete-artifact@v2
| actions/upload-artifact | joutvhu/delete-artifact |
|-------------------------|-------------------------|
| v1, v2, v3 | v1 |
| v4 | v2 |

## Usage

Expand Down
18 changes: 11 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,29 @@ description: Delete a build artifact that was previously uploaded in the workflo
author: Giao Ho
inputs:
owner:
# Default: Current owner
description: The name of the owner of the repo. Used to identify the owner of the repository.
description: The name of the owner of the repo, this is the repository that artifacts will be deleted from. Default is current owner.
required: false
repo:
# Default: Current repository
description: The name of the repository. Used to identify the repository on which to release.
description: The name of the repository, this is the repository that artifacts will be deleted from. Default is current repository.
required: false
runId:
description: WorkflowRun of the artifact(s) to lookup
run-id:
description: 'The id of the workflow run where the desired delete artifact was uploaded from.
If github-token is specified, this is the run that artifacts will be deleted from.'
required: false
token:
description: Token with actions:read permissions
description: 'The GitHub token used to authenticate with the GitHub API.
This is required when deleting artifacts from a different repository or from a different workflow run.
If this is not specified, the action will attempt to delete artifacts from the current repository and the current workflow run.'
required: false
latest:
description: Filter the workflow run's artifacts to the latest by name In the case of reruns, this can be useful to avoid duplicates
required: false
name:
description: The name of the artifact to delete, multiple names can be supplied on new lines.
required: false
pattern:
description: A glob pattern matching the artifacts that should be deleted. Ignored if name is specified.
required: false
runs:
using: node20
main: action/index.js
Expand Down
Loading

0 comments on commit 9106fe5

Please sign in to comment.