diff --git a/.github/workflows/api-dog-e2e-tests.yml b/.github/workflows/api-dog-e2e-tests.yml index 4cc88afa..e37b9c61 100644 --- a/.github/workflows/api-dog-e2e-tests.yml +++ b/.github/workflows/api-dog-e2e-tests.yml @@ -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 diff --git a/.github/workflows/backmerge.yml b/.github/workflows/backmerge.yml index 3da0c35d..828947f3 100644 --- a/.github/workflows/backmerge.yml +++ b/.github/workflows/backmerge.yml @@ -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 }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cfd0c92e..b0df3e5d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -245,7 +245,7 @@ jobs: 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') diff --git a/.github/workflows/dispatch-helm.yml b/.github/workflows/dispatch-helm.yml index f48c94a9..801738b2 100644 --- a/.github/workflows/dispatch-helm.yml +++ b/.github/workflows/dispatch-helm.yml @@ -100,7 +100,7 @@ jobs: runs-on: ${{ inputs.runner_type }} steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v6.0.3 with: fetch-depth: 0 diff --git a/.github/workflows/frontend-pr-analysis.yml b/.github/workflows/frontend-pr-analysis.yml index 26138e12..137b591e 100644 --- a/.github/workflows/frontend-pr-analysis.yml +++ b/.github/workflows/frontend-pr-analysis.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/gitops-update.yml b/.github/workflows/gitops-update.yml index 7487e8ec..f62713e0 100644 --- a/.github/workflows/gitops-update.yml +++ b/.github/workflows/gitops-update.yml @@ -141,7 +141,7 @@ jobs: 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 }} @@ -149,7 +149,7 @@ jobs: 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 }} diff --git a/.github/workflows/go-ci.yml b/.github/workflows/go-ci.yml index a88368ef..65544781 100644 --- a/.github/workflows/go-ci.yml +++ b/.github/workflows/go-ci.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -253,7 +253,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v6 + uses: actions/checkout@v6.0.3 - name: Check required files run: | diff --git a/.github/workflows/go-fuzz.yml b/.github/workflows/go-fuzz.yml index 0204e8a0..5592a670 100644 --- a/.github/workflows/go-fuzz.yml +++ b/.github/workflows/go-fuzz.yml @@ -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 diff --git a/.github/workflows/go-pr-analysis.yml b/.github/workflows/go-pr-analysis.yml index c1b6d18c..c7ff0148 100644 --- a/.github/workflows/go-pr-analysis.yml +++ b/.github/workflows/go-pr-analysis.yml @@ -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 != '' @@ -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 != '' @@ -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 != '' @@ -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 @@ -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 != '' @@ -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 != '' @@ -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 != '' diff --git a/.github/workflows/go-release.yml b/.github/workflows/go-release.yml index ba3e8322..d5d55c8a 100644 --- a/.github/workflows/go-release.yml +++ b/.github/workflows/go-release.yml @@ -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: @@ -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: @@ -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 @@ -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 diff --git a/.github/workflows/go-security.yml b/.github/workflows/go-security.yml index 67f52ada..bf15c249 100644 --- a/.github/workflows/go-security.yml +++ b/.github/workflows/go-security.yml @@ -76,7 +76,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - name: Dependency Review uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0 @@ -90,7 +90,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - name: Set up Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 @@ -117,7 +117,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - name: Set up Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 @@ -138,7 +138,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - name: Set up Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 @@ -162,7 +162,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0 @@ -187,7 +187,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 with: fetch-depth: 0 @@ -206,7 +206,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - name: Set up Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 @@ -240,7 +240,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - name: Set up Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 diff --git a/.github/workflows/gptchangelog.yml b/.github/workflows/gptchangelog.yml index e710151e..f82f9ceb 100644 --- a/.github/workflows/gptchangelog.yml +++ b/.github/workflows/gptchangelog.yml @@ -62,7 +62,7 @@ jobs: is_stable: ${{ steps.check-tag.outputs.is_stable }} steps: - name: Checkout for branch check - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 with: fetch-depth: 0 @@ -139,7 +139,7 @@ jobs: - name: Checkout repository if: steps.check-tag.outputs.is_stable == 'true' || inputs.stable_releases_only == false - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 with: fetch-depth: 0 @@ -257,7 +257,7 @@ jobs: private-key: ${{ secrets.LERIAN_STUDIO_MIDAZ_PUSH_BOT_PRIVATE_KEY }} - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 with: fetch-depth: 0 token: ${{ steps.app-token.outputs.token }} diff --git a/.github/workflows/helm-release-notification.yml b/.github/workflows/helm-release-notification.yml index 57c2f839..dd05956b 100644 --- a/.github/workflows/helm-release-notification.yml +++ b/.github/workflows/helm-release-notification.yml @@ -85,7 +85,7 @@ jobs: runs-on: ${{ inputs.runner_type }} steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v4 with: fetch-depth: 0 diff --git a/.github/workflows/helm-update-chart.yml b/.github/workflows/helm-update-chart.yml index 2ecdc3bf..6a181a22 100644 --- a/.github/workflows/helm-update-chart.yml +++ b/.github/workflows/helm-update-chart.yml @@ -167,7 +167,7 @@ jobs: jq -c '.components' /tmp/payload.json > /tmp/components.json - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 with: token: ${{ steps.app-token.outputs.token }} fetch-depth: 0 diff --git a/.github/workflows/lerian-lib-version-check.yml b/.github/workflows/lerian-lib-version-check.yml index e6beb92d..8a03935e 100644 --- a/.github/workflows/lerian-lib-version-check.yml +++ b/.github/workflows/lerian-lib-version-check.yml @@ -77,7 +77,7 @@ jobs: has_lerian_libs: ${{ steps.check.outputs.has_lerian_libs }} steps: - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 with: fetch-depth: 1 diff --git a/.github/workflows/pr-security-scan.yml b/.github/workflows/pr-security-scan.yml index 7b306d32..2ff495c1 100644 --- a/.github/workflows/pr-security-scan.yml +++ b/.github/workflows/pr-security-scan.yml @@ -173,7 +173,7 @@ jobs: password: ${{ secrets.DOCKERHUB_IMAGE_PULL_TOKEN }} - name: Checkout Repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - name: Set up Docker Buildx if: inputs.enable_docker_scan @@ -282,7 +282,7 @@ jobs: steps: # ----------------- Setup ----------------- - name: Checkout Repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - name: Extract changed paths from matrix id: extract-paths diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index 0fc47b87..97a1fe5f 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -132,7 +132,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 with: fetch-depth: 0 diff --git a/.github/workflows/release-notification.yml b/.github/workflows/release-notification.yml index 71d275ff..aa53ca78 100644 --- a/.github/workflows/release-notification.yml +++ b/.github/workflows/release-notification.yml @@ -124,7 +124,7 @@ jobs: private-key: ${{ secrets.APP_PRIVATE_KEY }} - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - name: Fetch latest release tag id: release diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6bd076ff..5968c34b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -160,7 +160,7 @@ jobs: private-key: ${{ secrets.LERIAN_STUDIO_MIDAZ_PUSH_BOT_PRIVATE_KEY }} - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 with: fetch-depth: 0 token: ${{ steps.app-token.outputs.token }} @@ -367,7 +367,7 @@ jobs: client-id: ${{ secrets.LERIAN_STUDIO_MIDAZ_PUSH_BOT_APP_ID }} private-key: ${{ secrets.LERIAN_STUDIO_MIDAZ_PUSH_BOT_PRIVATE_KEY }} - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 with: fetch-depth: 0 token: ${{ steps.app-token.outputs.token }} diff --git a/.github/workflows/s3-upload.yml b/.github/workflows/s3-upload.yml index d3872bd8..e3310505 100644 --- a/.github/workflows/s3-upload.yml +++ b/.github/workflows/s3-upload.yml @@ -126,7 +126,7 @@ jobs: upload: runs-on: ${{ inputs.runner_type }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v6.0.3 - name: Determine environment id: env diff --git a/.github/workflows/self-pr-validation.yml b/.github/workflows/self-pr-validation.yml index cf553463..442e6c84 100644 --- a/.github/workflows/self-pr-validation.yml +++ b/.github/workflows/self-pr-validation.yml @@ -49,7 +49,7 @@ jobs: all_files: ${{ steps.detect.outputs.all-files }} steps: - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - name: Detect changed files id: detect @@ -65,7 +65,7 @@ jobs: if: needs.changed-files.outputs.yaml_files != '' steps: - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - name: YAML Lint uses: ./src/lint/yamllint @@ -80,7 +80,7 @@ jobs: if: needs.changed-files.outputs.workflow_files != '' steps: - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - name: Action Lint uses: ./src/lint/actionlint @@ -95,7 +95,7 @@ jobs: if: needs.changed-files.outputs.action_files != '' steps: - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - name: Pinned Actions Check uses: ./src/lint/pinned-actions @@ -110,7 +110,7 @@ jobs: if: needs.changed-files.outputs.markdown_files != '' steps: - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - name: Markdown Link Check uses: ./src/lint/markdown-link-check @@ -125,7 +125,7 @@ jobs: runs-on: blacksmith-4vcpu-ubuntu-2404 steps: - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - name: Spelling Check uses: ./src/lint/typos @@ -140,7 +140,7 @@ jobs: if: needs.changed-files.outputs.action_files != '' steps: - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - name: Shell Check uses: ./src/lint/shellcheck @@ -155,7 +155,7 @@ jobs: if: needs.changed-files.outputs.action_files != '' steps: - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - name: README Check uses: ./src/lint/readme-check @@ -170,7 +170,7 @@ jobs: if: needs.changed-files.outputs.composite_files != '' steps: - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - name: Composite Schema Lint uses: ./src/lint/composite-schema @@ -185,7 +185,7 @@ jobs: if: contains(needs.changed-files.outputs.all_files, 'config/deployment-matrix.yml') steps: - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - name: Deployment Matrix Lint uses: ./src/lint/deployment-matrix @@ -205,7 +205,7 @@ jobs: actions: read steps: - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - name: Generate CodeQL config for changed files id: codeql-config @@ -248,7 +248,7 @@ jobs: if: always() && github.event_name == 'pull_request' && needs.changed-files.result == 'success' steps: - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - name: Post Lint Report uses: ./src/notify/pr-lint-reporter diff --git a/.github/workflows/typescript-build.yml b/.github/workflows/typescript-build.yml index 353eeef0..981930c3 100644 --- a/.github/workflows/typescript-build.yml +++ b/.github/workflows/typescript-build.yml @@ -260,7 +260,7 @@ jobs: app: ${{ fromJson(needs.prepare.outputs.matrix) }} steps: - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - name: Build and push Docker image id: docker-build diff --git a/.github/workflows/typescript-ci.yml b/.github/workflows/typescript-ci.yml index 778e9485..68cb68f9 100644 --- a/.github/workflows/typescript-ci.yml +++ b/.github/workflows/typescript-ci.yml @@ -83,7 +83,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v6 + uses: actions/checkout@v6.0.3 - name: Setup Node.js uses: actions/setup-node@v6 @@ -122,7 +122,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v6 + uses: actions/checkout@v6.0.3 - name: Setup Node.js ${{ matrix.node }} uses: actions/setup-node@v6 @@ -176,7 +176,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v6 + uses: actions/checkout@v6.0.3 - name: Setup Node.js uses: actions/setup-node@v6 @@ -224,7 +224,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v6 + uses: actions/checkout@v6.0.3 - name: Setup Node.js uses: actions/setup-node@v6 diff --git a/.github/workflows/typescript-release.yml b/.github/workflows/typescript-release.yml index f7329d77..85c40f7d 100644 --- a/.github/workflows/typescript-release.yml +++ b/.github/workflows/typescript-release.yml @@ -121,7 +121,7 @@ jobs: private-key: ${{ secrets.LERIAN_STUDIO_MIDAZ_PUSH_BOT_PRIVATE_KEY }} - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 with: fetch-depth: 0 token: ${{ steps.app-token.outputs.token }} diff --git a/.github/workflows/version-propagation.yml b/.github/workflows/version-propagation.yml index ed60ecb1..3fd73d0f 100644 --- a/.github/workflows/version-propagation.yml +++ b/.github/workflows/version-propagation.yml @@ -60,7 +60,7 @@ jobs: # Avoids races where a push to main between release and propagation # would change the matrix or composite code under our feet. - name: Checkout shared-workflows - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 with: ref: ${{ github.workflow_sha }} diff --git a/docs/go-release-workflow.md b/docs/go-release-workflow.md index f9863313..c5e73fb1 100644 --- a/docs/go-release-workflow.md +++ b/docs/go-release-workflow.md @@ -29,10 +29,27 @@ Umbrella reusable workflow for Go **service** repositories (deployable apps that | `app_name` | Override app/image name (single-app mode) | string | `''` (repo name) | | `docker_build_args` | Newline-separated Docker build args | string | `''` | | `enable_cosign_sign` | Sign images with cosign keyless (OIDC) | boolean | `true` | +| `app_name_prefix` | Prefix for app names in monorepo (e.g. `midaz` -> `midaz-agent`) | string | `''` | +| `app_name_overrides` | Explicit `path:name` app name mappings | string | `''` | +| `dockerhub_org` | DockerHub organization name | string | `lerianstudio` | +| `path_level` | Directory depth level to extract app name | string | `2` | +| `build_context_from_working_dir` | Use the component working_dir as Docker build context | boolean | `false` | +| `enable_helm_dispatch` | Dispatch to the Helm repository for chart updates after build | boolean | `false` | +| `helm_chart` | Helm chart name to update (required when `enable_helm_dispatch`) | string | `''` | +| `helm_detect_env_changes` | Detect new environment variables for Helm during dispatch | boolean | `true` | +| `helm_values_key_mappings` | JSON mapping of component names to values.yaml keys | string | `''` | | `enable_gitops_update` | Run the gitops-update job on tag push | boolean | `true` | | `gitops_repository` | GitOps repository to update (org/repo) | string | `LerianStudio/midaz-firmino-gitops` | | `gitops_artifact_pattern` | Pattern to download GitOps artifacts | string | `''` | | `gitops_yaml_key_mappings` | JSON mapping of artifact names to YAML keys | string | `''` | +| `gitops_runner_type` | Runner for the gitops-update (deploy) job (needs cluster access) | string | `firmino-lxc-runners` | +| `enable_argocd_sync` | Trigger ArgoCD sync after updating the GitOps repo | boolean | `true` | +| `commit_message_prefix` | Prefix for the GitOps commit message (defaults to repo name when empty) | string | `''` | +| `deploy_in_firmino` | Force-off override for Firmino; set `false` to suppress deployment even when the manifest includes the app | boolean | `true` | +| `deploy_in_clotilde` | Force-off override for Clotilde; set `false` to suppress deployment even when the manifest includes the app | boolean | `true` | +| `use_dynamic_mapping` | Use dynamic artifact-to-YAML key mapping | boolean | `false` | +| `configmap_updates` | JSON mapping of artifact names to configmap keys (helmfile only) | string | `''` | +| `enable_docker_login` | Log in to DockerHub in the gitops-update job | boolean | `false` | | `shared_paths` | Path patterns that trigger a release/build for all components | string | `''` | | `filter_paths` | Path prefixes to filter (empty = single-app repo) | string | `''` | diff --git a/src/validate/lerian-lib-version/action.yml b/src/validate/lerian-lib-version/action.yml index 93948773..3ce4b48a 100644 --- a/src/validate/lerian-lib-version/action.yml +++ b/src/validate/lerian-lib-version/action.yml @@ -167,8 +167,9 @@ runs: fi # We page through up to 100 releases and pick the highest stable tag that - # matches the requested major (when set). Pre-releases are excluded by the - # `prerelease == false` filter applied via jq. + # matches the requested major (when set). Pre-releases are excluded both by + # the `prerelease == false` API flag and by a tag-name filter below, since + # the flag is not reliable (a -beta/-rc release may be published with it unset). local http_code local releases_json http_code=$(curl -sS -o "${RUNNER_TEMP:-/tmp}/releases.json" -w '%{http_code}' \ @@ -203,6 +204,11 @@ runs: local tags tags=$(echo "${releases_json}" | jq -r '.[]? | select(.draft==false) | select(.prerelease==false) | .tag_name' 2>/dev/null || true) + # Belt-and-suspenders: drop any pre-release tag name (e.g. v2.7.0-beta.8) + # even when the GitHub release's `prerelease` flag was not set. Per semver, + # a hyphen after the patch denotes a pre-release; keep stable vMAJOR.MINOR.PATCH only. + tags=$(printf '%s\n' "${tags}" | grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+$' || true) + if [[ -z "${tags}" ]]; then LATEST_CACHE[${cache_key}]="" echo ""