-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
34 lines (34 loc) · 2.16 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Artifact Size Based Cleanup
description: Cleanup artifacts base on the size limit to make sure the storage space is not exhausted.
author: Ruofan <[email protected]>
branding:
icon: 'archive'
color: 'yellow'
inputs:
token:
description: The GitHub token used to access the repository. Must be granted access permission with 'workflow' scope.
required: true
limit:
description: The maximum size of the artifacts in bytes for current repository. Action will make sure the all artifacts size is less than this limit and reserve enough space for new artifacts. Allowed values includes - [1024, 256KB, 512MB, 1.5GB].
required: true
fixedReservedSize:
description: Optional. Use a fixed size to reserve the space. If not provided, will use the value of 'artifactPaths' to calculate the size of the artifacts to be uploaded automatically. Allowed values includes - [1024, 256KB, 512MB, 1.5GB]. An exception will be thrown if both 'fixedReservedSize' and 'artifactPaths' are not provided.
required: false
artifactPaths:
description: Optional. The paths of the artifacts to be uploaded, will calculate the size automatically. If not provided, will use the value of 'fixedReservedSize'. An exception will be thrown if both 'fixedReservedSize' and 'artifactPaths' are not provided.
required: false
simulateCompressionLevel:
description: Optional. The compression level of the artifacts to be uploaded. Should be the same value as you specific in the upload artifacts action. Will use this value to simulate the compression and calculate the actual size of the artifact after compression. If not provided, will use the default value of 6.
required: false
default: 6
failOnError:
description: Indicates whether the action should fail once encountering any errors.
required: false
default: true
removeDirection:
description: The direction to remove the artifacts. Allowed values includes - [oldest, newest]. If set to 'oldest', the action will remove the oldest artifacts first. If set to 'newest', the action will remove the newest artifacts first.
required: false
default: oldest
runs:
using: node20
main: ./dist/index.js