Reusable GitHub Actions workflows for CI/CD pipelines.
Builds and runs a Docker test container for a service.
uses: gerardovitale/github-workflows/.github/workflows/test-service.yml@v1
with:
service: api
| Input |
Required |
Description |
service |
yes |
Service directory to test (must contain Dockerfile.test) |
Builds a Docker image and pushes it to Docker Hub with SHA and latest tags.
uses: gerardovitale/github-workflows/.github/workflows/build-service.yml@v1
with:
service: api
image_prefix: "myapp-"
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
| Input |
Required |
Default |
Description |
service |
yes |
— |
Service directory to build (must contain Dockerfile) |
image_prefix |
no |
"" |
Prefix for image name (e.g., myapp- produces user/myapp-api) |
platforms |
no |
"" |
Comma-separated platforms for multi-arch builds (e.g., linux/amd64,linux/arm64). If empty, builds single-arch. |
extra_cache_key_files |
no |
"" |
Additional files for cache key hash (e.g., uv.lock). Comma-separated, relative to service dir. |
| Secret |
Required |
Description |
DOCKER_USERNAME |
yes |
Docker Hub username |
DOCKER_PASSWORD |
yes |
Docker Hub password or token |
Runs a Terraform init/plan/apply cycle with GCP authentication.
uses: gerardovitale/github-workflows/.github/workflows/terraform-deploy.yml@v1
with:
working_directory: ./infra
terraform_vars: '-var "DOCKER_IMAGE_TAG=abc1234"'
env_vars: |
TF_VAR_APP_NAME=myapp
TF_VAR_REGION=europe-southwest1
secrets:
gcp_credentials: ${{ secrets.GCP_CREDENTIALS }}
| Input |
Required |
Default |
Description |
working_directory |
no |
./infra |
Path to Terraform project directory |
terraform_version |
no |
1.10.4 |
Terraform version |
terraform_vars |
no |
"" |
Terraform -var flags as a single string |
env_vars |
no |
"" |
Environment variables as KEY=VALUE pairs, one per line |
| Secret |
Required |
Description |
gcp_credentials |
yes |
GCP service account JSON |
Triggers a Google Cloud Run job and waits for completion.
uses: gerardovitale/github-workflows/.github/workflows/trigger-cloud-run-job.yml@v1
with:
region: europe-southwest1
app_name: myapp
component: worker
args: "--flag,value"
secrets:
gcp_credentials: ${{ secrets.GCP_CREDENTIALS }}
| Input |
Required |
Default |
Description |
region |
yes |
— |
GCP region |
app_name |
yes |
— |
Job name prefix |
component |
yes |
— |
Job name suffix (also used as container name) |
args |
no |
"" |
Comma-separated arguments passed to the container |
| Secret |
Required |
Description |
gcp_credentials |
yes |
GCP service account JSON |
Runs a dbt command against BigQuery.
uses: gerardovitale/github-workflows/.github/workflows/run-dbt.yml@v1
with:
dbt_profile: myproject
dbt_target: prod
dbt_subcommand: build
secrets:
gcp_credentials: ${{ secrets.GCP_DBT_CREDENTIALS }}
| Input |
Required |
Default |
Description |
dbt_directory |
no |
./dbt |
Path to dbt project |
dbt_profiles_dir |
no |
./.dbt |
Path to profiles directory |
dbt_profile |
yes |
— |
dbt profile name |
dbt_target |
no |
test |
dbt target name |
python_version |
no |
3.13 |
Python version |
dbt_subcommand |
no |
build |
dbt command (build/test/run/etc.) |
dbt_args |
no |
"" |
Extra arguments |
python_warnings |
no |
ignore::FutureWarning |
PYTHONWARNINGS value |
| Secret |
Required |
Description |
gcp_credentials |
yes |
GCP service account JSON for BigQuery |
This repo uses semantic versioning with floating major tags:
- Pin to a major version:
@v1 (receives patches automatically)
- Pin to an exact version:
@v1.0.0