getActionPin returns the pinned reference for the latest version of the repo using only the embedded pins (no WorkflowData required).
(repo string)
| 74 | // getActionPin returns the pinned reference for the latest version of the repo |
| 75 | // using only the embedded pins (no WorkflowData required). |
| 76 | func getActionPin(repo string) string { |
| 77 | pins := actionpins.GetActionPinsByRepo(repo) |
| 78 | if len(pins) == 0 { |
| 79 | actionPinsLog.Printf("No embedded pins found for repo: %s", repo) |
| 80 | return "" |
| 81 | } |
| 82 | return actionpins.FormatPinnedActionReference(repo, pins[0].SHA, pins[0].Version) |
| 83 | } |
| 84 | |
| 85 | // getActionPin returns the pinned reference for the given repo, using GHES-compatible |
| 86 | // v3.x pins for artifact actions when c.ghesArtifactCompat is true. |