Skip to content

Commit

Permalink
ghactions list: skip local references from list
Browse files Browse the repository at this point in the history
This skips local references from the list sub-command, since these
are not relevant. We'll parse them anyway and output their inner actions
which is what we really care about.

We have a similar mechanism for the replacer piece of `ghactions`.

Closes: #39
  • Loading branch information
JAORMX committed Dec 12, 2023
1 parent 1cefc1e commit c55c1bc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/ghactions/ghactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,12 @@ func setOfActions(node *yaml.Node) (mapset.Set[Action], error) {

if foundUses {
foundUses = false

// If the value is a local path, skip it
if IsLocal(v.Value) {
continue
}

a, err := parseValue(v.Value)
if err != nil {
return nil, fmt.Errorf("failed to parse action reference '%s': %w", v.Value, err)
Expand Down

0 comments on commit c55c1bc

Please sign in to comment.