Skip to content

Commit

Permalink
feat(actions): update actions/upload-artifact@v4 (#1251)
Browse files Browse the repository at this point in the history
Created automatically.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Feb 1, 2024
1 parent 168adb6 commit 28b40cb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion actions/actions/upload-artifact/v4/commit-hash.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1eb3cb2b3e0f29609092a73eb033bb759a334595
26f96dfa697d77e81fd5907df203aa23a56210a8
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ package io.github.typesafegithub.workflows.actions.actions
import io.github.typesafegithub.workflows.domain.actions.Action
import io.github.typesafegithub.workflows.domain.actions.RegularAction
import java.util.LinkedHashMap
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
Expand Down Expand Up @@ -42,6 +43,9 @@ import kotlin.collections.toTypedArray
* as GNU Gzip) - 9: Best compression Higher levels will result in better compression, but will take
* longer to complete. For large files that are not easily compressed, a value of 0 is recommended for
* significantly faster uploads.
* @param overwrite If true, an artifact with a matching name will be deleted before a new one is
* uploaded. If false, the action will fail if an artifact for the given name already exists. Does not
* fail if the artifact does not exist.
* @param _customInputs Type-unsafe map where you can put any inputs that are not yet supported by
* the binding
* @param _customVersion Allows overriding action's version, for example to use a specific minor
Expand Down Expand Up @@ -77,6 +81,12 @@ public data class UploadArtifactV4 private constructor(
* significantly faster uploads.
*/
public val compressionLevel: UploadArtifactV4.CompressionLevel? = null,
/**
* If true, an artifact with a matching name will be deleted before a new one is uploaded. If
* false, the action will fail if an artifact for the given name already exists. Does not fail if
* the artifact does not exist.
*/
public val overwrite: Boolean? = null,
/**
* Type-unsafe map where you can put any inputs that are not yet supported by the binding
*/
Expand All @@ -94,10 +104,11 @@ public data class UploadArtifactV4 private constructor(
ifNoFilesFound: UploadArtifactV4.BehaviorIfNoFilesFound? = null,
retentionDays: UploadArtifactV4.RetentionPeriod? = null,
compressionLevel: UploadArtifactV4.CompressionLevel? = null,
overwrite: Boolean? = null,
_customInputs: Map<String, String> = mapOf(),
_customVersion: String? = null,
) : this(name=name, path=path, ifNoFilesFound=ifNoFilesFound, retentionDays=retentionDays,
compressionLevel=compressionLevel, _customInputs=_customInputs,
compressionLevel=compressionLevel, overwrite=overwrite, _customInputs=_customInputs,
_customVersion=_customVersion)

@Suppress("SpreadOperator")
Expand All @@ -108,6 +119,7 @@ public data class UploadArtifactV4 private constructor(
ifNoFilesFound?.let { "if-no-files-found" to it.stringValue },
retentionDays?.let { "retention-days" to it.integerValue.toString() },
compressionLevel?.let { "compression-level" to it.integerValue.toString() },
overwrite?.let { "overwrite" to it.toString() },
*_customInputs.toList().toTypedArray(),
).toTypedArray()
)
Expand Down

0 comments on commit 28b40cb

Please sign in to comment.