Workflow Outputs¶
Reference for outputs provided by Go Gamma Actions workflows.
Test Workflow¶
| Output | Type | Description |
|---|---|---|
coverage-percentage | string | Test coverage as percentage (e.g., "85.5") |
Usage Example¶
jobs:
test:
uses: go-gamma/actions/.github/workflows/test.yml@v1
with:
go-version: '1.24'
check:
needs: test
runs-on: ubuntu-latest
steps:
- name: Check coverage
run: |
coverage="${{ needs.test.outputs.coverage-percentage }}"
echo "Coverage: ${coverage}%"
if (( $(echo "$coverage < 80" | bc -l) )); then
echo "::warning::Coverage below 80%"
fi
Security Workflow¶
| Output | Type | Description |
|---|---|---|
gosec-result | string | pass or issues-found |
govulncheck-result | string | pass or vulnerabilities-found |
Usage Example¶
jobs:
security:
uses: go-gamma/actions/.github/workflows/security.yml@v1
with:
go-version: '1.24'
fail-on-vulns: false
report:
needs: security
runs-on: ubuntu-latest
steps:
- name: Check results
run: |
if [ "${{ needs.security.outputs.gosec-result }}" = "issues-found" ]; then
echo "::warning::Security issues found"
fi
if [ "${{ needs.security.outputs.govulncheck-result }}" = "vulnerabilities-found" ]; then
echo "::warning::Vulnerabilities found"
fi
CI Workflow¶
The CI workflow inherits outputs from its child workflows:
| Source | Output | Description |
|---|---|---|
| test | coverage-percentage | Test coverage |
| security | gosec-result | gosec result |
| security | govulncheck-result | govulncheck result |
Output Availability
Outputs are only available from workflows that completed successfully. Skipped workflows don't produce outputs.
Using Outputs in Dependent Jobs¶
Basic Pattern¶
jobs:
test:
uses: go-gamma/actions/.github/workflows/test.yml@v1
deploy:
needs: test
if: needs.test.outputs.coverage-percentage >= 80
runs-on: ubuntu-latest
steps:
- run: echo "Deploying..."
Conditional Logic¶
jobs:
security:
uses: go-gamma/actions/.github/workflows/security.yml@v1
with:
fail-on-vulns: false
notify:
needs: security
if: always()
runs-on: ubuntu-latest
steps:
- name: Slack notification
if: needs.security.outputs.gosec-result == 'issues-found'
run: |
# Send Slack notification about security issues