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

Add pattern input #36

Merged
merged 2 commits into from
Jan 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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