Skip to content

Commit

Permalink
Use the repository default for artifact retention
Browse files Browse the repository at this point in the history
Rather than using a custom 7 day default retention, just fall back
to the repository setting for artifact retention.
  • Loading branch information
bigdaz committed Nov 9, 2023
1 parent 33f1d73 commit b84f847
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
3 changes: 1 addition & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ inputs:
default: 'disabled'

artifact-retention-days:
description: Specifies the number of days to retain any artifacts generated by the action. Defaults to 7 days. Set to zero for maximum retention.
description: Specifies the number of days to retain any artifacts generated by the action. If not set, the default retention settings for the repository will apply.
required: false
default: 7

# EXPERIMENTAL & INTERNAL ACTION INPUTS
# The following action properties allow fine-grained tweaking of the action caching behaviour.
Expand Down
2 changes: 1 addition & 1 deletion dist/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94070,7 +94070,7 @@ function getDependencyGraphOption() {
exports.getDependencyGraphOption = getDependencyGraphOption;
function getArtifactRetentionDays() {
const val = core.getInput('artifact-retention-days');
return parseNumericInput('artifact-retention-days', val, 7);
return parseNumericInput('artifact-retention-days', val, 0);
}
exports.getArtifactRetentionDays = getArtifactRetentionDays;
function parseNumericInput(paramName, paramValue, paramDefault) {
Expand Down
2 changes: 1 addition & 1 deletion dist/main/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/post/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93938,7 +93938,7 @@ function getDependencyGraphOption() {
exports.getDependencyGraphOption = getDependencyGraphOption;
function getArtifactRetentionDays() {
const val = core.getInput('artifact-retention-days');
return parseNumericInput('artifact-retention-days', val, 7);
return parseNumericInput('artifact-retention-days', val, 0);
}
exports.getArtifactRetentionDays = getArtifactRetentionDays;
function parseNumericInput(paramName, paramValue, paramDefault) {
Expand Down
2 changes: 1 addition & 1 deletion dist/post/index.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/input-params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ export function getDependencyGraphOption(): DependencyGraphOption {

export function getArtifactRetentionDays(): number {
const val = core.getInput('artifact-retention-days')
return parseNumericInput('artifact-retention-days', val, 7)
return parseNumericInput('artifact-retention-days', val, 0)
// Zero indicates that the default repository settings should be used
}

export function parseNumericInput(paramName: string, paramValue: string, paramDefault: number): number {
Expand Down

0 comments on commit b84f847

Please sign in to comment.