gh-action-pin

module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 24, 2025 License: AGPL-3.0

README

GitHub Actions Pin Tool

Stability Notice

  • Behavior Stability: The CLI's exit codes and file modification behavior are considered stable
  • Output Stability: Specific output messages to stdout/stderr may change between versions
  • Interface Stability: Command line flags and configuration options are stable

While we strive to maintain compatibility, scripts parsing CLI output should use the exit codes and file changes as their primary integration points.

Acceptance Testing

These end-to-end tests verify the complete functionality of the CLI.

Prerequisites
  • Go 1.21+
  • (Optional) GitHub API token
Running Tests
Acceptance Tests

Basic acceptance test run:

# From repository root
go test -tags=acceptance ./cmd/gh-action-pin/...
Unit Tests

Run all unit tests:

# From repository root
go test ./...

Fast mode (skip slow tests):

# From repository root - runs quickly by skipping slow tests
go test -short ./...

Run optimized tests only:

# Run the simplified test versions that are faster but provide good coverage
go test -run "TestSimple" ./internal/workflow

Run specific test function:

# Run a specific test by name
go test -v -run TestSimpleMaxDepth ./internal/workflow
Applying copyriht notice to files

Run find . -type d -name "exclude_me" -prune -o -name "*.go" -print0 | xargs -0 sh scripts/add-copyright.sh to apply copyright notice to all Golang files.

Contact

The creator of gh-action-pin can be reached at mads 'at' v42 'dot' dk.

Directories

Path Synopsis
cmd
gh-action-pin command
internal
actionlookup
Package actionlookup provides GitHub Action version resolution to SHA hashes.
Package actionlookup provides GitHub Action version resolution to SHA hashes.
workflow
Package workflow provides tools for analyzing and securing GitHub Actions workflows.
Package workflow provides tools for analyzing and securing GitHub Actions workflows.

Jump to

Keyboard shortcuts

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