Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/api-dog-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
runs-on: ${{ inputs.runner_type }}
steps:
- name: Checkout Repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/backmerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ jobs:
private-key: ${{ secrets.LERIAN_STUDIO_MIDAZ_PUSH_BOT_PRIVATE_KEY }}

- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@

steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Set up QEMU
if: contains(needs.prepare.outputs.platforms, 'arm64')
Expand Down Expand Up @@ -286,7 +286,7 @@
fi

if [ "${{ inputs.enable_dockerhub }}" == "true" ]; then
IMAGES="${{ inputs.dockerhub_org }}/${{ matrix.app.name }}"

Check warning

Code scanning / CodeQL

Code injection Medium

Potential code injection in ${ inputs.dockerhub_org }, which may be controlled by an external user.
Potential code injection in ${ inputs.dockerhub_org }, which may be controlled by an external user.
Potential code injection in ${ inputs.dockerhub_org }, which may be controlled by an external user.
fi

if [ "${{ inputs.enable_ghcr }}" == "true" ]; then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dispatch-helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
runs-on: ${{ inputs.runner_type }}
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v6.0.3
with:
fetch-depth: 0

Expand All @@ -109,8 +109,8 @@
run: |
BASE_PATH="${{ inputs.components_base_path }}"
ENV_FILE="${{ inputs.env_file }}"
DETECT_ENV="${{ inputs.detect_env_changes }}"

Check warning

Code scanning / CodeQL

Code injection Medium

Potential code injection in ${ inputs.detect_env_changes }, which may be controlled by an external user.
VALUES_KEY_MAPPINGS='${{ inputs.values_key_mappings }}'

Check warning

Code scanning / CodeQL

Code injection Medium

Potential code injection in ${ inputs.values_key_mappings }, which may be controlled by an external user.

# Determine BEFORE_SHA for comparison
# For tags, github.event.before is 0000..., so we need to find the previous tag
Expand Down Expand Up @@ -288,7 +288,7 @@

# Build the full payload
PAYLOAD=$(jq -n \
--arg chart "${{ inputs.chart }}" \

Check warning

Code scanning / CodeQL

Code injection Medium

Potential code injection in ${ inputs.chart }, which may be controlled by an external user.
Potential code injection in ${ inputs.chart }, which may be controlled by an external user.
Potential code injection in ${ inputs.chart }, which may be controlled by an external user.
--argjson components "$COMPONENTS" \
--arg has_new_env_vars "${{ steps.process.outputs.has_new_env_vars }}" \
--arg source_repo "${{ github.repository }}" \
Expand Down Expand Up @@ -338,7 +338,7 @@
echo "### Dispatch Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Repository:** \`${{ inputs.helm_repository }}\`" >> $GITHUB_STEP_SUMMARY
echo "**Chart:** \`${{ inputs.chart }}\`" >> $GITHUB_STEP_SUMMARY

Check warning

Code scanning / CodeQL

Code injection Medium

Potential code injection in ${ inputs.chart }, which may be controlled by an external user.
Potential code injection in ${ inputs.chart }, which may be controlled by an external user.
Potential code injection in ${ inputs.chart }, which may be controlled by an external user.
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Components:**" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/frontend-pr-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
app: ${{ fromJson(needs.detect-changes.outputs.matrix) }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
Expand Down Expand Up @@ -181,7 +181,7 @@ jobs:
app: ${{ fromJson(needs.detect-changes.outputs.matrix) }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
Expand Down Expand Up @@ -217,7 +217,7 @@ jobs:
app: ${{ fromJson(needs.detect-changes.outputs.matrix) }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
Expand Down Expand Up @@ -258,7 +258,7 @@ jobs:
app: ${{ fromJson(needs.detect-changes.outputs.matrix) }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
Expand Down Expand Up @@ -317,7 +317,7 @@ jobs:
app: ${{ fromJson(needs.detect-changes.outputs.matrix) }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Download coverage artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
Expand Down Expand Up @@ -451,7 +451,7 @@ jobs:
app: ${{ fromJson(needs.detect-changes.outputs.matrix) }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
Expand Down Expand Up @@ -492,7 +492,7 @@ jobs:
app: ${{ fromJson(needs.detect-changes.outputs.matrix) }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gitops-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,15 @@
echo "gitops_repository validated: $GITOPS_REPOSITORY"

- name: Checkout GitOps Repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
repository: ${{ inputs.gitops_repository }}
token: ${{ secrets.MANAGE_TOKEN }}
path: gitops
fetch-depth: 0

- name: Checkout deployment matrix manifest
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
repository: LerianStudio/github-actions-shared-workflows
ref: ${{ inputs.deployment_matrix_ref }}
Expand All @@ -175,10 +175,10 @@
echo "Application name: $APP_NAME"

# Generate commit message prefix if not provided
if [[ -z "${{ inputs.commit_message_prefix }}" ]]; then

Check warning

Code scanning / CodeQL

Code injection Medium

Potential code injection in ${ inputs.commit_message_prefix }, which may be controlled by an external user.
COMMIT_PREFIX="$APP_NAME"
else
COMMIT_PREFIX="${{ inputs.commit_message_prefix }}"

Check warning

Code scanning / CodeQL

Code injection Medium

Potential code injection in ${ inputs.commit_message_prefix }, which may be controlled by an external user.
fi
echo "commit_prefix=$COMMIT_PREFIX" >> "$GITHUB_OUTPUT"
echo "Commit message prefix: $COMMIT_PREFIX"
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/go-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@v6.0.3

- name: Set up Go
uses: actions/setup-go@v6
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@v6.0.3

- name: Download coverage artifact
uses: actions/download-artifact@v8
Expand All @@ -137,7 +137,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@v6.0.3

- name: Set up Go
uses: actions/setup-go@v6
Expand All @@ -159,7 +159,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@v6.0.3

- name: Set up Go
uses: actions/setup-go@v6
Expand Down Expand Up @@ -208,7 +208,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@v6.0.3

- name: Set up Go
uses: actions/setup-go@v6
Expand All @@ -227,7 +227,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@v6.0.3

- name: Set up Go
uses: actions/setup-go@v6
Expand All @@ -253,7 +253,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@v6.0.3

- name: Check required files
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go-fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v6.0.3

- name: Set up Go
uses: actions/setup-go@v6
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/go-pr-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
app: ${{ fromJson(needs.detect-changes.outputs.matrix) }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Install system dependencies
if: inputs.system_packages != ''
Expand Down Expand Up @@ -233,7 +233,7 @@ jobs:
app: ${{ fromJson(needs.detect-changes.outputs.matrix) }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Install system dependencies
if: inputs.system_packages != ''
Expand Down Expand Up @@ -329,7 +329,7 @@ jobs:
app: ${{ fromJson(needs.detect-changes.outputs.matrix) }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Install system dependencies
if: inputs.system_packages != ''
Expand Down Expand Up @@ -483,7 +483,7 @@ jobs:
app: ${{ fromJson(needs.detect-changes.outputs.matrix) }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Setup Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
Expand Down Expand Up @@ -735,7 +735,7 @@ jobs:
app: ${{ fromJson(needs.detect-changes.outputs.matrix) }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Install system dependencies
if: inputs.system_packages != ''
Expand Down Expand Up @@ -815,7 +815,7 @@ jobs:
app: ${{ fromJson(needs.detect-changes.outputs.matrix) }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Install system dependencies
if: inputs.system_packages != ''
Expand Down Expand Up @@ -867,7 +867,7 @@ jobs:
app: ${{ fromJson(needs.detect-changes.outputs.matrix) }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Install system dependencies
if: inputs.system_packages != ''
Expand Down
86 changes: 85 additions & 1 deletion .github/workflows/go-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,42 @@ on:
description: 'Sign container images with cosign keyless (OIDC) signing after push'
type: boolean
default: true
app_name_prefix:
description: 'Prefix for app names in monorepo (e.g., "midaz" -> "midaz-agent")'
type: string
default: ''
app_name_overrides:
description: 'Explicit app name mappings in "path:name" format. Overrides default extraction for matched paths.'
type: string
default: ''
dockerhub_org:
description: 'DockerHub organization name'
type: string
default: 'lerianstudio'
path_level:
description: 'Directory depth level to extract app name (e.g., 2 -> "apps/agent")'
type: string
default: '2'
build_context_from_working_dir:
description: 'Use the component working_dir as Docker build context instead of the repo root.'
type: boolean
default: false
enable_helm_dispatch:
description: 'Dispatch to the Helm repository for chart updates after build'
type: boolean
default: false
helm_chart:
description: 'Helm chart name to update (required when enable_helm_dispatch is true)'
type: string
default: ''
helm_detect_env_changes:
description: 'Detect new environment variables for Helm during dispatch'
type: boolean
default: true
helm_values_key_mappings:
description: 'JSON mapping of component names to values.yaml keys (e.g., {"my-app": "api"})'
type: string
default: ''

# ----------------- GitOps Update (gitops-update.yml) -----------------
enable_gitops_update:
Expand All @@ -85,6 +121,38 @@ on:
description: 'JSON object mapping artifact names to YAML keys (e.g., {"app.tag": ".api.image.tag"})'
type: string
default: ''
gitops_runner_type:
description: 'Runner for the gitops-update (deploy) job. Deploy needs cluster access, so this defaults to firmino-lxc-runners rather than the build runner.'
type: string
default: 'firmino-lxc-runners'
enable_argocd_sync:
description: 'Trigger ArgoCD sync after updating the GitOps repository'
type: boolean
default: true
commit_message_prefix:
description: 'Prefix for the GitOps commit message (defaults to repository name when empty)'
type: string
default: ''
deploy_in_firmino:
description: 'Force-off override for Firmino. Set to false to suppress deployment even if the manifest includes this app on Firmino.'
type: boolean
default: true
deploy_in_clotilde:
description: 'Force-off override for Clotilde. Set to false to suppress deployment even if the manifest includes this app on Clotilde.'
type: boolean
default: true
use_dynamic_mapping:
description: 'Use dynamic artifact-to-YAML key mapping in gitops-update'
type: boolean
default: false
configmap_updates:
description: 'JSON object mapping artifact names to configmap keys (helmfile layout only)'
type: string
default: ''
enable_docker_login:
description: 'Log in to DockerHub in the gitops-update job (for private image digest reads)'
type: boolean
default: false

# ----------------- Shared -----------------
shared_paths:
Expand Down Expand Up @@ -160,8 +228,17 @@ jobs:
enable_ghcr: ${{ inputs.enable_ghcr }}
enable_gitops_artifacts: ${{ inputs.enable_gitops_artifacts }}
app_name: ${{ inputs.app_name }}
app_name_prefix: ${{ inputs.app_name_prefix }}
app_name_overrides: ${{ inputs.app_name_overrides }}
dockerhub_org: ${{ inputs.dockerhub_org }}
path_level: ${{ inputs.path_level }}
build_context_from_working_dir: ${{ inputs.build_context_from_working_dir }}
docker_build_args: ${{ inputs.docker_build_args }}
enable_cosign_sign: ${{ inputs.enable_cosign_sign }}
enable_helm_dispatch: ${{ inputs.enable_helm_dispatch }}
helm_chart: ${{ inputs.helm_chart }}
helm_detect_env_changes: ${{ inputs.helm_detect_env_changes }}
helm_values_key_mappings: ${{ inputs.helm_values_key_mappings }}
shared_paths: ${{ inputs.shared_paths }}
filter_paths: ${{ inputs.filter_paths }}
secrets: inherit
Expand All @@ -177,8 +254,15 @@ jobs:
packages: write
uses: ./.github/workflows/gitops-update.yml
with:
runner_type: ${{ inputs.runner_type }}
runner_type: ${{ inputs.gitops_runner_type }}
gitops_repository: ${{ inputs.gitops_repository }}
artifact_pattern: ${{ inputs.gitops_artifact_pattern }}
yaml_key_mappings: ${{ inputs.gitops_yaml_key_mappings }}
enable_argocd_sync: ${{ inputs.enable_argocd_sync }}
commit_message_prefix: ${{ inputs.commit_message_prefix }}
deploy_in_firmino: ${{ inputs.deploy_in_firmino }}
deploy_in_clotilde: ${{ inputs.deploy_in_clotilde }}
use_dynamic_mapping: ${{ inputs.use_dynamic_mapping }}
configmap_updates: ${{ inputs.configmap_updates }}
enable_docker_login: ${{ inputs.enable_docker_login }}
secrets: inherit
Loading