Installation¶
This guide walks you through adding Go Gamma Actions to your project.
Prerequisites¶
Before you begin, ensure you have:
- A Go project with a
go.modfile - GitHub Actions enabled on your repository
- (Optional) A Codecov account for coverage tracking
Step 1: Create Workflow File¶
Create a new file at .github/workflows/ci.yml in your repository:
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
ci:
uses: go-gamma/actions/.github/workflows/ci.yml@v1
with:
go-version: '1.24'
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Step 2: Configure Secrets (Optional)¶
For Codecov integration, add your Codecov token:
- Go to your repository Settings > Secrets and variables > Actions
- Click New repository secret
- Name:
CODECOV_TOKEN - Value: Your Codecov upload token
Organization Secrets
If you're using Go Gamma Actions across multiple repositories, consider adding CODECOV_TOKEN as an organization secret.
Step 3: Enable Security Scanning (Optional)¶
For GitHub Code Scanning integration, add permissions:
jobs:
ci:
uses: go-gamma/actions/.github/workflows/ci.yml@v1
permissions:
contents: read
security-events: write # Required for SARIF upload
with:
go-version: '1.24'
upload-sarif: true
Step 4: Commit and Push¶
Verification¶
After pushing, check the Actions tab in your repository. You should see:
- ✅ Tests running with race detection
- ✅ Linting with 50+ rules
- ✅ Security scanning
- ✅ Cross-platform builds
Next Steps¶
- Quick Start - Learn the basics
- Configuration - Customize the workflows
- Workflows Reference - Explore all options