You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: adds support for actions/upload-artifact@v4 (#17) (fixed#14)
* feat: add support for upload-artifact@v4, deprecates support for previous versions
* chore: update docs, fix CI workflow
* docs: fix example
* docs: add deprecation note
* docs: add token note
---------
Co-authored-by: Richard Herman <geekyeggo@users.noreply.github.com>
- Add support for artifacts uploaded with `actions/upload-artifact@v4`.
17
+
- Add requirement of `token` with read and write access to actions.
18
+
- Update requests to use GitHub REST API.
19
+
- Deprecate support for `actions/upload-artifact@v1`, `actions/upload-artifact@v2`, and `actions/upload-artifact@v3` (please use `geekyeggo/delete-artifact@v2`).
20
+
21
+
## v2.0
22
+
23
+
- Add support for glob pattern matching via `useGlob`.
Copy file name to clipboardExpand all lines: README.md
+21-14Lines changed: 21 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,38 +5,48 @@
5
5
6
6
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.
> From version 2 onwards, glob (wildcard) support is on by default, and is fulfilled by [minimatch](https://www.npmjs.com/package/minimatch); this can be disabled by setting `useGlob`to `false`.
19
+
> [!IMPORTANT]
20
+
> Support for `actions/upload-artifact@v4` utilizes GitHub's REST API, and requires a token with read and write access to actions.
14
21
15
22
### Delete an individual artifact
16
23
17
24
```yml
18
25
steps:
19
-
- uses: actions/checkout@v2
26
+
- name: Checkout
27
+
uses: actions/checkout@v4
20
28
21
-
- run: echo hello > world.txt
29
+
- name: Create test file
30
+
run: echo hello > test.txt
22
31
23
-
- uses: actions/upload-artifact@v2
32
+
- uses: actions/upload-artifact@v4
24
33
with:
25
34
name: my-artifact
26
-
path: world.txt
35
+
path: test.txt
27
36
28
-
# delete-artifact
29
-
- uses: geekyeggo/delete-artifact@v2
37
+
- uses: geekyeggo/delete-artifact@v4
30
38
with:
39
+
token: ${{ secrets.TOKEN }}
31
40
name: my-artifact
32
41
```
33
42
34
43
### Specify multiple names
35
44
36
45
```yml
37
46
steps:
38
-
- uses: geekyeggo/delete-artifact@v2
47
+
- uses: geekyeggo/delete-artifact@v4
39
48
with:
49
+
token: ${{ secrets.TOKEN }}
40
50
name: |
41
51
artifact-*
42
52
binary-file
@@ -49,13 +59,10 @@ By default, the action will fail when it was not possible to delete an artifact
49
59
50
60
```yml
51
61
steps:
52
-
- uses: geekyeggo/delete-artifact@v2
62
+
- uses: geekyeggo/delete-artifact@v4
53
63
with:
64
+
token: ${{ secrets.TOKEN }}
54
65
name: okay-to-keep
55
66
failOnError: false
56
67
```
57
68
58
-
## ⚠ Disclaimer
59
-
60
-
This action utilizes a preview version of GitHub's runtime API; the API is subject to change at any time which may result in failures of this action.
0 commit comments