pin

package
v1.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2025 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func ActionExists added in v1.5.2

func ActionExists(actionName string, patterns []string) bool

Function to check if an action matches any pattern in the list

func IsImmutableAction added in v1.5.0

func IsImmutableAction(action string) bool

isImmutableAction checks if the action is an immutable action or not It queries the OCI manifest for the action and checks if the artifact type is "application/vnd.github.actions.package.v1+json"

Example usage:

# Immutable action (returns true)
isImmutableAction("actions/checkout@v4.2.2")

# Non-Immutable action (returns false)
isImmutableAction("actions/checkout@v4.2.3")

REF - https://github.com/actions/publish-immutable-action/issues/216#issuecomment-2549914784

func PinAction

func PinAction(action, inputYaml string, exemptedActions []string, pinToImmutable bool) (string, bool)

func PinActions

func PinActions(inputYaml string, exemptedActions []string, pinToImmutable bool) (string, bool, error)

func PinDocker

func PinDocker(inputYaml string) (string, bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL