This repository contains a comprehensive set of reusable GitHub Actions workflows for building, testing, and publishing various types of applications and libraries.
To use these workflows in your project, create a workflow file in your repository's .github/workflows/ directory:
name: CI/CD Pipeline
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
build_and_deploy:
uses: tehw0lf/workflows/.github/workflows/build-test-publish.yml@main
permissions:
actions: write # Required for workflow management
contents: write # Required for GitHub releases
packages: write # Required for Docker/GHCR publishing
security-events: write # Required for security scanning (SARIF uploads)
id-token: write # REQUIRED - Always needed (currently for npm Trusted Publishing, planned for future OIDC integrations)
attestations: write # Required for SBOM provenance attestation (npm/yarn builds)
with:
tool: npm
lint: "run lint"
test: "run test"
build_main: "run build"
artifact_path: "dist"
docker_meta: '[{"name":"my-app","file":"Dockerfile"}]'
libraries: "lib1,lib2"
library_path: "packages"
secrets: inheritImportant permissions:
id-token: writeis REQUIRED for all workflows - Currently used for npm, Python, and Rust Trusted Publishing (no NPM_TOKEN, UV_TOKEN, or CARGO_REGISTRY_TOKEN needed!), with plans to extend OIDC to other publishing workflows in the futuresecurity-events: writeis REQUIRED - Enables SARIF uploads to GitHub Security tab for centralized vulnerability tracking- Due to GitHub Actions limitations, these permissions must be set at the top-level calling workflow, regardless of which publishing workflows you use
- If using
release-itfor npm, add.release-it.jsonwith{"npm": {"skipChecks": true}}
The main orchestrator workflow that handles the complete CI/CD pipeline.
Key Features:
- β Multi-language support (Node.js, Python, Rust, Java, Gradle, Bash)
- β Triple-layer security scanning (pre-build source + post-build artifacts + post-publish verification)
- β Automated testing and building
- β Multi-platform publishing (Docker, npm, PyPI, crates.io, Firefox, Android)
- β Conditional deployment based on branch and inputs
Required Inputs:
- None. All inputs are optional;
toolselects the build system. Publishing is gated ongithub.event_nameinternally β do not pass anevent_nameinput, it does not exist.
Optional Inputs (complete):
All 44 inputs are optional. Grouped by purpose; defaults are the workflow's own.
Project & build
| Input | Default | Description |
|---|---|---|
tool |
none |
Build tool: npm, yarn, uv, cargo, ./gradlew, mvn, bash |
root_dir |
. |
Path to project root (set this for monorepos) |
head_ref |
"" |
Branch that triggered the run β pass ${{ github.head_ref }} |
runner |
ubuntu-latest |
Runner label for all jobs |
install |
"" |
Install script |
format |
"" |
Format script |
lint |
"" |
Lint script |
test |
"" |
Test script |
e2e |
"" |
E2E test script |
build_branch |
"" |
Build script for branch runs |
build_main |
"" |
Build script for main-branch runs |
post_build_script |
"" |
Script to run after the build step |
artifact_path |
"" |
Path to build outputs to upload as an artifact |
Docker publishing
| Input | Default | Description |
|---|---|---|
docker_meta |
"" |
JSON array: [{"name":"image","file":"Dockerfile"}] |
docker_namespace |
tehw0lf |
Docker namespace |
registry |
ghcr.io |
Target registry |
platforms |
linux/amd64,linux/arm64 |
Comma-separated build platforms |
docker_pre |
"" |
Script to run before building the image |
npm publishing
| Input | Default | Description |
|---|---|---|
libraries |
"" |
Comma-separated libraries to publish |
library_path |
"" |
Path to the libraries β also gates whether the npm job runs at all |
npm_namespace |
@tehw0lf |
npm scope |
cyclonedx_ignore_npm_errors |
false |
Pass --ignore-npm-errors during SBOM generation (needed with overrides) |
Python, Rust, Firefox, Android, GitHub releases
| Input | Default | Description |
|---|---|---|
publish_python_libraries |
false |
Validate build + tag for PyPI release (requires tool: uv; upload is parked, see Β§5) |
rust_version |
stable |
Rust toolchain version |
enable_clippy |
true |
Run Clippy |
enable_rustfmt |
true |
Run rustfmt check |
clippy_args |
-- -D warnings |
Extra Clippy arguments |
cargo_features |
"" |
Features to enable, e.g. async,network |
cargo_dry_run |
false |
Dry-run instead of publishing to crates.io |
cargo_package_name |
"" |
Crate name (defaults to workspace name) |
cargo_publish_flags |
"" |
Extra flags for cargo publish |
addon_api_url_prefix |
https://addons.mozilla.org/api/v5 |
Extension signing API. Set to https://addons.thunderbird.net/api/v4 for ATN |
addon_channel |
listed |
Extension target channel |
addon_approval_timeout |
0 |
Milliseconds to wait for AMO approval and the signed XPI. 0 succeeds once upload and validation pass β what listed add-ons need, since AMO never auto-signs them. Set a value only for unlisted add-ons. AMO only, ignored by ATN |
xpi_path |
"" |
Path to the packaged .xpi β gates the Firefox job |
app_root |
"" |
Android app root β gates the APK release job |
publish_github_release |
false |
Set to true to create a GitHub release |
release_pre |
"" |
Script to run before the release |
Security scanning
| Input | Default | Description |
|---|---|---|
enable_security_scanning |
true |
Master switch for all scanning layers |
semgrep_rules |
auto |
Ruleset: auto, p/security-audit, p/owasp-top-ten, p/ci |
npm_audit_omit_dev |
false |
Skip dev dependencies (use when dev-only vulns have no fix) |
npm_audit_severity_threshold |
moderate |
low, moderate, high, critical |
trivy_severity |
MEDIUM,HIGH,CRITICAL |
Severity levels to report |
trivy_exit_code |
1 |
0 = warn only, 1 = fail the build |
Input types are enforced β never quote a boolean or number. Every input is
declared boolean, number or string, and GitHub matches the caller's value
against that type without coercion. Passing publish_github_release: "true"
(a string) to a boolean input does not evaluate as true β it aborts the entire
run with startup_failure before a single job starts, and the log shows no
failing step because nothing ran.
publish_github_release: true # correct
publish_github_release: "true" # startup_failure - the whole run is rejected
trivy_exit_code: 1 # correct
trivy_exit_code: "1" # startup_failureBooleans here are publish_github_release, publish_python_libraries,
enable_security_scanning, npm_audit_omit_dev, enable_clippy,
enable_rustfmt, cargo_dry_run and cyclonedx_ignore_npm_errors; numbers are
trivy_exit_code and (in security-scan-dast.yml) max_duration_minutes.
Note that actionlint does not catch this class of error β it accepts
mismatched types, unknown input names and all β so the first sign of trouble is a
run that dies at startup.
Inputs that gate a job. Several publishing jobs run only when a specific input is
non-empty, in addition to requiring a push event: docker_meta (Docker),
library_path (npm), xpi_path (Firefox/Thunderbird), app_root (Android),
artifact_path and publish_github_release: true (GitHub release),
tool: uv plus publish_python_libraries: true (PyPI, which tags rather
than uploads β see Β§5), and tool: cargo alone (crates.io). Setting libraries
without library_path silently publishes nothing.
Core workflow for testing and building applications.
Features:
- β Advanced dependency caching for faster builds (tool-specific cache keys)
- β Multi-language toolchain setup
- β Nx monorepo support
- β Playwright E2E testing (supports .ts, .js, and .mjs config variants)
- β Descriptive artifact upload suffixes for clarity
- β Configurable timeouts (45 minutes)
Publishes Docker images to container registries.
Features:
- β Multi-platform builds (linux/amd64, linux/arm64)
- β Flexible registry support (GHCR, Docker Hub, private registries)
- β Input validation for security
- β Matrix builds for multiple images with fail-fast: false
- β Timeout protection (30 minutes)
Publishes Node.js libraries to npm registry using Trusted Publishing (Provenance).
Features:
- β Trusted Publishing: No NPM_TOKEN required - uses OpenID Connect (OIDC)
- β Version comparison to prevent duplicate publishes
- β Multi-library support
- β Security: Input sanitization and validation
- β Dry-run validation (catches errors before publish)
- β Timeout protection (20 minutes)
Important: Requires id-token: write permission instead of NPM_TOKEN secret
β οΈ Does not upload to PyPI right now β this is deliberate, not a defect. The directuv publishstep was removed in March 2026 (9283f81) because PyPI's Trusted Publishing does not work for a package published through a reusable workflow. The step is parked, not abandoned: it goes back in once PyPI supports this, so leavepublish_python_librarieswired up in callers that will want it.
What it does today: validates that the build artifact exists, acting as a
gate in front of set-git-tag.yml, which tags the release. Publishing then
happens in your repository: add a workflow triggered on tag push that runs
uv publish directly, so the publish is not routed through a reusable workflow.
So publish_python_libraries: true gives you a validated build and a version
tag β not a PyPI upload. The job passing does not mean a release was
published.
Features:
- β Explicit artifact validation with clear error messages
- β Feeds the tag job that triggers your repo's own publishing workflow
- β Timeout protection (15 minutes)
- βΈοΈ Trusted Publishing β parked upstream, see the note above
Important: id-token: write is still required; the job requests the token
even while the upload step is parked.
Publishes Rust crates to crates.io using OIDC Trusted Publishing (RFC 3691).
Features:
- β OIDC Trusted Publishing: No CARGO_REGISTRY_TOKEN required - uses OpenID Connect
- β
Uses
rust-lang/crates-io-auth-action@v1for authentication - β Short-lived tokens (auto-revoked after workflow completion)
- β Version deduplication via crates.io API
- β Dry-run support for testing
- β Configurable Rustfmt and Clippy with custom arguments
- β Cargo dependency caching (registry, git, target)
- β Feature flag support (optional cargo features)
- β Timeout protection (15 minutes)
Important: Requires id-token: write permission and Trusted Publisher configuration on crates.io
Configuration:
with:
tool: cargo
rust_version: stable # Toolchain version
enable_rustfmt: true # Run rustfmt checks
enable_clippy: true # Run clippy linting
clippy_args: "-- -D warnings" # Clippy arguments
cargo_features: "async,network" # Optional featuresPublishes Firefox browser extensions to Mozilla Add-ons.
Features:
- β Automated packaging (XPI creation)
- β AMO (addons.mozilla.org) publishing
- β Timeout protection (15 minutes)
Builds and releases Android APK files.
Features:
- β Automated keystore generation and caching
- β APK signing and alignment
- β GitHub releases integration
- β Timeout protection (30 minutes)
Creates GitHub releases with artifacts.
Features:
- β Automatic version detection (Python projects)
- β Configurable release tags
- β Artifact attachment
- β Timeout protection (10 minutes)
Aggregates and reports results from all publishing workflows.
Features:
- β Comprehensive status tracking across all workflows
- β Visual summary table with status indicators
- β Published artifacts tracking and output
- β Refactored from 90 lines to 30 lines (67% reduction) using helper functions
- β Quick timeout (5 minutes)
Pre-build security layer that scans source code and dependencies before building.
Features:
- β Semgrep SAST: Fast static analysis for all languages (configurable rulesets)
- β Bandit: Python-specific source code security analysis
- β pip-audit: Python dependency vulnerability scanning (official PyPA tool)
- β npm/yarn audit: Node.js dependency vulnerability scanning
- β SARIF uploads: Results appear in GitHub Security tab
- β Fail-fast: Prevents building vulnerable code
- β Timeout protection (15 minutes)
Configuration:
with:
enable_security_scanning: true # Enable/disable (default: enabled)
semgrep_rules: "auto" # auto, p/security-audit, p/owasp-top-ten, p/ciAll tools are 100% free and open source:
- β No signup required, no usage limits
- β Industry-standard tools used by major projects
- β Active maintenance and community support
Pre-publish security layer that scans build artifacts before publishing.
Features:
- β Trivy: Comprehensive filesystem scanner for packages and dependencies
- β Grype: Alternative vulnerability scanner for redundancy
- β
Filesystem scanning: Scans artifacts from
artifact_path - β Security summary tables: Visual vulnerability reports in workflow output
- β Security gate: Blocks publishing of vulnerable artifacts
- β Timeout protection (20 minutes)
Post-publish security layer that verifies published Docker images.
Features:
- β Trivy: Scans published Docker images pulled from registry
- β GHCR Authentication: Uses GitHub OIDC token for registry access
- β Supply chain verification: Detects post-build tampering or vulnerabilities
- β Multi-image support: Scans all published Docker images
- β SARIF uploads: Results appear in GitHub Security tab
- β Timeout protection (20 minutes)
Configuration:
with:
trivy_severity: "MEDIUM,HIGH,CRITICAL" # Severity threshold
trivy_exit_code: 1 # 0=warn only, 1=fail buildDefense-in-depth architecture:
- Pre-build (security-scan-source.yml): Scan code & dependencies β Prevent vulnerable builds
- Build (test-and-build.yml): Create artifacts
- Pre-publish (security-scan-artifacts.yml): Scan filesystem artifacts β Block vulnerable publishes
- Publish: Docker images, npm packages, PyPI packages, etc.
- Post-publish (post-publish-verification.yml): Verify published Docker images β Detect supply chain attacks β
Automatic remediation for npm audit failures on Dependabot PRs. Called automatically by security-scan-source.yml when npm audit fails on a Dependabot PR.
Flow:
Dependabot PR β CI fails (npm audit) β this workflow β
fix branch + PR on Dependabot branch β CI must pass on fix-PR β
human reviews + merges fix-PR β Dependabot merges into main
Features:
- β
Runs
npm audit fixautomatically on Dependabot PRs - β Creates a fix branch with unique SHA suffix (prevents race conditions)
- β Opens a PR targeting the Dependabot branch with a detailed summary table
- β Verifies whether audit is clean after fix
- β
Consistent
omit_devflag with the calling security scan - β
Only modifies
package-lock.jsonβ neverpackage.json - β Timeout protection (15 minutes)
Triggered automatically β no manual configuration needed beyond the security-scan-source.yml integration.
Required repository setting: Go to Settings β Actions β General β Workflow permissions and enable "Allow GitHub Actions to create and approve pull requests". Without this, the workflow cannot open the fix PR.
IMPORTANT: The id-token: write permission is REQUIRED for all workflows, regardless of which publishing targets you use:
jobs:
build_and_deploy:
uses: tehw0lf/workflows/.github/workflows/build-test-publish.yml@main
permissions:
id-token: write # REQUIRED - Always needed for OIDC (npm/Python Trusted Publishing + future integrations)
attestations: write # Required by the build job (SBOM provenance attestation)
actions: write # Required for workflow management
contents: write # Required for GitHub releases
packages: write # Required for Docker/GHCR publishing
security-events: write # REQUIRED - For security scanning SARIF uploads
with:
tool: npm
# ... other inputsWhy are these permissions always required?
id-token: write:
- Currently used for npm, Python, and Rust Trusted Publishing (no NPM_TOKEN, UV_TOKEN, or CARGO_REGISTRY_TOKEN needed!)
- Planned for future OIDC integrations with other publishing targets (Docker registries, etc.)
- Due to GitHub Actions limitations, permissions cannot be conditionally granted in reusable workflows
- Must be set at the top-level calling workflow, even if you're not publishing to npm, PyPI, or crates.io
attestations: write:
- Required by the
test_and_buildjob, which attests SBOM provenance with Sigstore - Only takes effect for
tool: npm/tool: yarn, but must be granted regardless β permissions are evaluated before the job runs and cannot be made conditional - Omitting it fails the build at the attestation step, not at setup
security-events: write:
- Required for uploading SARIF reports to GitHub Security tab
- Enables centralized security vulnerability tracking across repositories
- Provides detailed security findings for Semgrep, Bandit, Trivy, and Grype scans
- Cannot be conditionally granted in reusable workflows
Add these secrets to your repository settings based on your publishing targets:
# For Docker publishing
GITHUB_TOKEN: # Auto-provided by GitHub
# For npm publishing - NO NPM_TOKEN NEEDED!
# Uses Trusted Publishing (Provenance) with OIDC
# Requires: id-token: write permission (see above)
# For Python publishing - NO UV_TOKEN NEEDED!
# Upload step is currently parked (see Β§5); the job tags instead
# Requires: id-token: write permission (see above)
# For Rust/Cargo publishing - NO CARGO_REGISTRY_TOKEN NEEDED!
# Uses OIDC Trusted Publishing (RFC 3691)
# Requires: id-token: write permission (see above)
# For Firefox extensions
ADDON_API_KEY: # AMO or ATN API key, matching addon_api_url_prefix
ADDON_API_SECRET: # AMO or ATN API secret, matching addon_api_url_prefix
# For Android builds
ANDROID_STOREPASS: # Android keystore password
# For Nx Cloud (optional)
NX_CLOUD_ACCESS_TOKEN: # Nx Cloud access tokenWhen using release-it with Trusted Publishing, you need to configure it to skip npm's built-in checks since the workflow handles authentication via OIDC.
Create a .release-it.json file in your project root:
{
"npm": {
"skipChecks": true
}
}Why is this needed?
- Release-it normally checks for npm authentication before publishing
- With Trusted Publishing, authentication happens automatically via GitHub's OIDC token
skipChecks: truetells release-it to trust the workflow's authentication
project/
βββ package.json
βββ .release-it.json # Required for release-it + Trusted Publishing
βββ src/
βββ dist/
βββ Dockerfile (optional)
βββ .github/workflows/ci.yml
project/
βββ package.json
βββ src/
βββ dist/
βββ Dockerfile (optional)
βββ .github/workflows/ci.yml
project/
βββ pyproject.toml
βββ uv.lock
βββ src/
βββ dist/
βββ .github/workflows/ci.yml
project/
βββ Cargo.toml
βββ Cargo.lock
βββ src/
β βββ main.rs (binary)
β βββ lib.rs (library)
βββ tests/
βββ benches/
βββ target/
βββ .github/workflows/ci-cd.yml
project/
βββ package.json
βββ packages/
β βββ lib1/package.json
β βββ lib2/package.json
βββ apps/
βββ nx.json
The npm publishing workflow generates and attests Software Bill of Materials (SBOM) for supply chain security:
- Automatic SBOM generation: Creates SBOM from package-lock.json/yarn.lock using CycloneDX
- Sigstore attestation: Signs SBOM with keyless signing via GitHub's OIDC (eliminates need for signing keys)
- Format: CycloneDX (
sbom/sbom.cyclonedx.json) - Artifact retention: SBOM uploaded as workflow artifact with 90-day retention
- Verification: Consumers can verify attestations using
npm audit signatures
Configuration: SBOM attestation is controlled by enable_sbom_attestation, an
input of test-and-build.yml (default: true). It is not exposed by the
build-test-publish.yml orchestrator β callers using the orchestrator get the
default and cannot turn it off; to configure it, call test-and-build.yml
directly. It only takes effect for tool: npm or tool: yarn.
The SBOM is generated in CycloneDX format (sbom/sbom.cyclonedx.json). There
is no sbom_format input.
Verifying SBOM attestations as a consumer:
# Download attestation bundle for a published package
npm audit signatures <package-name>
# View SBOM details
gh attestation verify oci://registry.npmjs.org/<namespace>/<package>@<version> \
--owner <github-org>Benefits:
- β Supply chain transparency: Full visibility into all dependencies
- β Vulnerability tracking: Quick querying against known malicious packages
- β Compliance: Meet SLSA/SSDF regulatory requirements
- β Incident response: Rapid impact analysis during supply chain attacks
100% free and open-source security tools - no signup, no limits, industry-standard:
Prevents vulnerable code from being built:
- β
Semgrep SAST: Fast static analysis for all languages
- Configurable rulesets: auto, p/security-audit, p/owasp-top-ten, p/ci
- Detects: SQL injection, XSS, hardcoded secrets, insecure patterns
- β Bandit (Python): Source code security analysis for Python projects
- β pip-audit (Python): Official PyPA tool for dependency vulnerability scanning
- β npm/yarn audit (Node.js): Built-in dependency vulnerability scanning
Security gate before publishing:
- β
Trivy: Comprehensive filesystem vulnerability scanner
- Scans: Filesystem artifacts, packages, dependencies
- Configurable severity thresholds (UNKNOWN, LOW, MEDIUM, HIGH, CRITICAL)
- β Grype: Redundant vulnerability scanner for additional coverage
- β Security summary tables: Visual reports in workflow output
- β SARIF uploads: Centralized findings in GitHub Security tab
Verifies published Docker images:
- β
Trivy: Scans published Docker images from registry
- Authenticates to GHCR using GitHub OIDC token
- Pulls and scans actual deployed images
- Detects post-build supply chain attacks
- β SARIF uploads: Results appear in GitHub Security tab
- β Multi-image support: Scans all published Docker images
with:
enable_security_scanning: true # Enable/disable (default: enabled)
semgrep_rules: "auto" # Semgrep ruleset
trivy_severity: "MEDIUM,HIGH,CRITICAL" # Severity threshold
trivy_exit_code: 1 # 0=warn only, 1=fail buildlint β security_scan_source β test_and_build β security_scan_artifacts β [publishing jobs] β post_publish_verification
β
β
β
β
β
β
All jobs depend on successful security scans - vulnerable code cannot be published and published images are verified.
- β Updated to latest action versions (checkout@v4, setup-node@v4)
- β Minimal permissions (contents: read by default)
- β Early secret validation with categorized exit codes
- β Defense-in-depth security architecture
- β JSON validation for Docker metadata
- β Library name sanitization
- β Path traversal prevention
- β Minimal required permissions
- β Secret-based conditional execution
- β Artifact existence validation
- β Optimized timeouts (5-60 minutes)
- β Prevents runaway builds
- β Resource usage optimization
- β Optimized timeouts for faster feedback
- β Conditional Playwright setup (only when needed)
- β Comprehensive workflow summary with status reporting
- β Refactored summary workflow (67% code reduction)
- β Multi-language dependency caching
- β Build tool caches (npm, pip, gradle, maven)
- β Cross-platform cache keys
- β Tool-specific cache keys for optimal isolation
- β Branch-based deployment
- β Artifact-dependent publishing
- β Tool-specific optimizations
- β Dependabot configuration for weekly GitHub Actions updates
- β Automated security patch application
- β Reduced manual maintenance burden
name: build and publish pipeline
on:
push:
branches:
- main
pull_request:
jobs:
build:
name: external workflow
uses: tehw0lf/workflows/.github/workflows/build-test-publish.yml@main
permissions:
id-token: write # REQUIRED - Always needed (npm Trusted Publishing + future OIDC)
attestations: write # Required for SBOM provenance attestation (npm/yarn builds)
actions: write # Required for workflow management
contents: write # Required for GitHub releases
packages: write # Required for Docker/GHCR publishing
security-events: write # Required for security scanning (SARIF uploads)
with:
tool: npm
lint: "run lint"
test: "run test"
build_main: "run build"
artifact_path: "dist"
library_path: "dist"uses: tehw0lf/workflows/.github/workflows/build-test-publish.yml@main
permissions:
id-token: write # REQUIRED - Always needed (npm Trusted Publishing + future OIDC)
attestations: write # Required for SBOM provenance attestation (npm/yarn builds)
contents: read
packages: write # Required for Docker publishing to GHCR
security-events: write # Required for security scanning (SARIF uploads)
with:
tool: npm
build_main: "run build"
artifact_path: "dist"
docker_meta: '[{"name":"my-app","file":"Dockerfile"}]'
docker_namespace: "mycompany"
registry: "ghcr.io"uses: tehw0lf/workflows/.github/workflows/build-test-publish.yml@main
permissions:
id-token: write # REQUIRED - Always needed (Python Trusted Publishing)
attestations: write # Required by the build job (SBOM provenance attestation)
contents: read
security-events: write # Required for security scanning (SARIF uploads)
with:
tool: uv
install: "sync"
lint: "run lint"
test: "run test"
build_main: "build"
artifact_path: "dist"
publish_python_libraries: truename: CI/CD
on:
push:
branches:
- main
pull_request:
jobs:
build_and_publish:
uses: tehw0lf/workflows/.github/workflows/build-test-publish.yml@main
permissions:
id-token: write # REQUIRED - For OIDC Trusted Publishing to crates.io
attestations: write # Required by the build job (SBOM provenance attestation)
actions: write
contents: write
packages: write
security-events: write
with:
tool: cargo
artifact_path: target/release/my-crate
# Rust configuration (all optional - defaults shown)
rust_version: stable
enable_rustfmt: true
enable_clippy: true
clippy_args: "-- -D warnings"
# Security scanning
enable_security_scanning: true
# GitHub release configuration (optional)
publish_github_release: trueNote: Before first publish, configure Trusted Publisher on crates.io for your repository. No secrets required!
uses: tehw0lf/workflows/.github/workflows/build-test-publish.yml@main
permissions:
id-token: write # REQUIRED - Always needed
attestations: write # Required for SBOM provenance attestation (npm/yarn builds)
contents: read
security-events: write # Required for security scanning (SARIF uploads)
with:
tool: bash
install: "install.sh"
lint: "lint.sh"
test: "test.sh"
build_main: "build.sh"
artifact_path: "dist"graph TD
A[build-test-publish.yml] --> L[lint.yml]
A --> M[security-scan-source.yml]
A --> B[test-and-build.yml]
A --> N[security-scan-artifacts.yml]
A --> C[publish-docker-image.yml]
A --> D[publish-npm-libraries.yml]
A --> E[publish-python-libraries.yml]
A --> F[publish-firefox-extension.yml]
A --> G[release-android-apk.yml]
A --> H[release-github.yml]
A --> K[publish-crates-io.yml]
A --> O[post-publish-verification.yml]
A --> J[summarize-workflow.yml]
L --> M
M --> B
B --> N
N --> C
N --> D
N --> E
N --> F
N --> G
N --> H
N --> K
C --> O
O --> J
C --> I[External: check-artifact + download-artifact]
D --> I
E --> I
F --> I
G --> I
H --> I
K --> I
Execution order:
- lint - Validate all workflows with actionlint
- security-scan-source - Pre-build security scanning (Semgrep, Bandit, pip-audit, npm audit)
- test-and-build - Run tests and build artifacts
- security-scan-artifacts - Pre-publish security scanning (Trivy, Grype on filesystem artifacts)
- [publishing jobs] - Only execute if all security scans pass
- post-publish-verification - Verify published Docker images from registry
- summarize-workflow - Aggregate results and report status
- Build timeouts: Adjust timeout values in workflow files
- Cache misses: Check cache key patterns and dependencies
- Permission errors: Verify repository secrets and permissions
- Artifact not found: Ensure
artifact_pathis correctly set
Solution: Ensure id-token: write permission is set in your workflow:
permissions:
id-token: writeSolution: Add .release-it.json to skip npm checks when using Trusted Publishing:
{
"npm": {
"skipChecks": true
}
}Solution:
- Verify
id-token: writepermission is granted - Ensure your npm package is configured for Trusted Publishing on npmjs.com
- Check that your GitHub repository has access to npm's OIDC provider
Solution: Ensure security-events: write permission is granted:
permissions:
security-events: writeSolution:
- Check the security tab for specific findings
- Review Semgrep rules configuration (
semgrep_rulesinput) - For false positives, add
# nosemgrepcomments or adjust ruleset - Disable security scanning temporarily with
enable_security_scanning: false(not recommended)
Solution:
- Review vulnerabilities in the security tab or workflow output
- Update dependencies to patched versions
- Adjust severity threshold if needed:
trivy_severity: "CRITICAL"(less strict) - Set
trivy_exit_code: 0to warn only (not recommended for production)
If you need to temporarily disable security scanning:
with:
enable_security_scanning: falseWarning: Disabling security scanning removes critical protection against vulnerabilities. Only use this for testing or non-production workflows.
Enable debug logging by adding this secret:
ACTIONS_STEP_DEBUG: true- Fork the repository
- Create a feature branch
- Make your changes
- Test with a sample project
- Submit a pull request
This workflow collection is available under the MIT License. See LICENSE for the full text.