refactor(ci): rewire workflows to call build-logic reusables [DAT-22876]#539
Conversation
…workflows Replace inline Docker build/test/scan/publish/README-sync logic with calls to reusable workflows in liquibase/build-logic. Preserves all existing triggers, matrix definitions, repository_dispatch types, and on: push paths filters. Phase 2 of DAT-22522 Dockerfile migration — this is a spike that rewires liquibase/docker as a consumer of the new reusables before any Dockerfile moves. Pinned to build-logic@dat-22876-reusables for validation; will flip to @main after build-logic merges. Net change: -1943 lines across 6 workflows. DAT-22876
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughRefactors multiple GitHub Actions workflows to delegate build, test, scan, publish, and README update logic to shared reusable workflows in liquibase/build-logic, replacing large inline job implementations with per-variant reusable workflow invocations and smaller orchestration jobs. Changes
Sequence Diagram(s)sequenceDiagram
participant Workflow as "Repo workflow"
participant Reusable as "liquibase/build-logic\nreusable workflows"
participant Secrets as "AWS/Vault / GitHub Secrets"
participant Registry as "GHCR / Docker Registry"
participant Scanner as "Trivy/Scanner"
Workflow->>Reusable: invoke reusable build/test/scan/readme jobs (per-variant)
Reusable->>Secrets: request secrets via secrets: inherit
Reusable->>Registry: build/push images (buildx, cosign, SBOM as configured)
Reusable->>Scanner: run vulnerability scans (per-variant)
Scanner->>Registry: upload SARIF / report results
Registry->>Workflow: return artifact/tag status
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Claude finished @jandroav's task in 1m 31s —— View job Code Review1 issue found: build-qa-docker.yml line 118 uses Strengths:
|
|
Claude finished @jandroav's task in 1m 7s —— View job Code Review1 Issue Found & Fixedbuild-qa-docker.yml lines 118 & 127: vulnerability-scan job used Status: ✅ Fix prepared locally
This ensures consistency with the PR goal: "All Summary
The fix is ready to merge once you approve the changes. |
Enables safe validation runs that preview the Docker Hub README push without updating it. dry_run passes through to the new dry_run input on reusable-docker-readme.yml (build-logic commit 0ea...). Push-triggered runs remain unchanged (dry_run defaults to false). DAT-22876
|
Claude finished @jandroav's task in 41s —— View job Code Review1 Critical Issue Found build-qa-docker.yml — Inconsistent reusable version pinLines 118 & 127 use
Impact: When the build-logic producer PR merges and this branch is updated to use Recommended Fix: Change both references to Note: I cannot directly modify .github/workflows files due to GitHub App permissions. You'll need to fix this manually or use another method to update the file. Summary✅ All other workflows correctly use
✅ Triggers and matrix definitions preserved across all workflows |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/create-release.yml:
- Around line 233-325: The build jobs (build-community, build-alpine,
build-secure) use the reusable workflow
liquibase/build-logic/.github/workflows/reusable-docker-build.yml which
currently does actions/checkout without a ref, so they may pick up the wrong
SHA; either extend that reusable workflow to accept a source_ref (or
checkout_ref) input and pass needs.update-dockerfiles.outputs.latestCommitSha
from each job's with: block (e.g., add source_ref: ${{
needs.update-dockerfiles.outputs.latestCommitSha }} in the with for
build-community/build-alpine/build-secure and use that input to set ref in
actions/checkout inside reusable-docker-build.yml), or alternatively ensure
update-dockerfiles pushes the bumped Dockerfile commit before these jobs run so
the default checkout SHA is correct.
In @.github/workflows/publish-liquibase-secure-readme.yml:
- Around line 16-22: The workflow's update-readme job is granting excessive repo
permissions; change the workflow permissions so that the reusable workflow call
(uses:
liquibase/build-logic/.github/workflows/reusable-docker-readme.yml@dat-22876-reusables)
only has contents: read (not write). Add or update a permissions block at the
workflow or job level for the update-readme job to explicitly set permissions:
contents: read, ensuring no write permission is granted when calling the
reusable workflow.
In @.github/workflows/publish-oss-readme.yml:
- Around line 15-21: The caller job named update-readme invoking
liquibase/build-logic/.github/workflows/reusable-docker-readme.yml@dat-22876-reusables
must grant repository read permissions so the reusable workflow's
actions/checkout can succeed; add permissions: contents: read to the
update-readme job (or the workflow-level permissions) so the reusable workflow
receives a token with repository content access when it runs.
In @.github/workflows/trivy.yml:
- Around line 94-95: Update the job-level if condition (the one using
needs.scan-community.result) so the persist-results job only runs when none of
the three scan jobs were cancelled: include checks for needs.scan-alpine.result
and needs.scan-secure.result in the boolean expression (i.e., require all three
results != 'cancelled') while keeping the existing always() and
github.event_name != 'pull_request' checks; modify the condition where the
current expression references needs.scan-community.result to reference all three
scan jobs (scan-community, scan-alpine, scan-secure).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3f69a58a-e03b-4e5b-b52e-04c678f543a1
📒 Files selected for processing (6)
.github/workflows/build-qa-docker.yml.github/workflows/create-release.yml.github/workflows/publish-liquibase-secure-readme.yml.github/workflows/publish-oss-readme.yml.github/workflows/test.yml.github/workflows/trivy.yml
| update-readme: | ||
| uses: liquibase/build-logic/.github/workflows/reusable-docker-readme.yml@dat-22876-reusables | ||
| with: | ||
| target_image: liquibase/liquibase-secure | ||
| readme_path: README-secure.md | ||
| short_description: "Liquibase Secure" | ||
| secrets: inherit |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
gh api 'repos/liquibase/build-logic/contents/.github/workflows/reusable-docker-readme.yml?ref=dat-22876-reusables' \
--jq '.content' | base64 -d > /tmp/reusable-docker-readme.yml
grep -nE 'contents:|actions/checkout|git push|createOrUpdate|readme_path' -C3 /tmp/reusable-docker-readme.ymlRepository: liquibase/docker
Length of output: 1497
Restrict reusable workflow to contents: read permission.
The called workflow only reads the README file and syncs it to Docker Hub via API; it does not require repository write access. Granting contents: write violates the principle of least privilege.
🔧 Proposed change
permissions:
- contents: write
+ contents: read
id-token: writeThe reusable workflow liquibase/build-logic/.github/workflows/reusable-docker-readme.yml@dat-22876-reusables declares only contents: read and performs no repository mutations—it checks out the caller repository, reads the specified README file, and invokes the Docker Hub API to update the image description.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/publish-liquibase-secure-readme.yml around lines 16 - 22,
The workflow's update-readme job is granting excessive repo permissions; change
the workflow permissions so that the reusable workflow call (uses:
liquibase/build-logic/.github/workflows/reusable-docker-readme.yml@dat-22876-reusables)
only has contents: read (not write). Add or update a permissions block at the
workflow or job level for the update-readme job to explicitly set permissions:
contents: read, ensuring no write permission is granted when calling the
reusable workflow.
| needs: [scan-community, scan-alpine, scan-secure] | ||
| if: always() && github.event_name != 'pull_request' && needs.scan-community.result != 'cancelled' |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
find .github -name "trivy.yml" -type fRepository: liquibase/docker
Length of output: 87
🏁 Script executed:
cat -n .github/workflows/trivy.ymlRepository: liquibase/docker
Length of output: 8594
Guard persistence on all scan jobs, not only Community.
The current if condition only checks needs.scan-community.result != 'cancelled', but the persist-results job depends on all three scan jobs: scan-community, scan-alpine, and scan-secure. If Alpine or Secure scans are cancelled (e.g., due to workflow interruption), the job will still run and attempt to download artifacts from all three scans. This can result in partial scan results being written to the scan-results branch.
🔧 Proposed fix
- if: always() && github.event_name != 'pull_request' && needs.scan-community.result != 'cancelled'
+ if: |
+ always() &&
+ github.event_name != 'pull_request' &&
+ needs.scan-community.result != 'cancelled' &&
+ needs.scan-alpine.result != 'cancelled' &&
+ needs.scan-secure.result != 'cancelled'📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| needs: [scan-community, scan-alpine, scan-secure] | |
| if: always() && github.event_name != 'pull_request' && needs.scan-community.result != 'cancelled' | |
| needs: [scan-community, scan-alpine, scan-secure] | |
| if: | | |
| always() && | |
| github.event_name != 'pull_request' && | |
| needs.scan-community.result != 'cancelled' && | |
| needs.scan-alpine.result != 'cancelled' && | |
| needs.scan-secure.result != 'cancelled' |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/trivy.yml around lines 94 - 95, Update the job-level if
condition (the one using needs.scan-community.result) so the persist-results job
only runs when none of the three scan jobs were cancelled: include checks for
needs.scan-alpine.result and needs.scan-secure.result in the boolean expression
(i.e., require all three results != 'cancelled') while keeping the existing
always() and github.event_name != 'pull_request' checks; modify the condition
where the current expression references needs.scan-community.result to reference
all three scan jobs (scan-community, scan-alpine, scan-secure).
The reusable-docker-readme.yml reusable needs contents:read at job level to checkout the caller repo. The top-level permissions block on publish-oss-readme.yml restricted to id-token:write only, implicitly denying contents. This caused startup_failure on workflow_dispatch. Matches the permissions block on publish-liquibase-secure-readme.yml (minus contents:write which Secure needs for a different reason). DAT-22876
|
Claude finished @jandroav's task in 40s —— View job Code Review
|
🔍 Vulnerabilities of
|
| digest | sha256:43c338fd3b50a6f1b6ad361a136f3e267098ab4ad0006e58ccc0547b619761e0 |
| vulnerabilities | |
| platform | linux/amd64 |
| size | 870 MB |
| packages | 478 |
📦 Base Image eclipse-temurin:21-jre
| also known as |
|
| digest | sha256:bdb940ff345a6f3d074a84c12923668744b39a7037d886c85a4a7608b7e9ba1b |
| vulnerabilities |
GitHub Actions workflow parser rejects dynamic 'strategy.matrix:
${{ fromJSON(...) }}' combined with 'uses:' reusable workflow call —
causes startup_failure at workflow parse time. Split into 3 named
build jobs (community, alpine, secure) + 3 vuln-scan jobs + 3 cleanup
jobs with 'if:' gates based on buildTargets input. Mirrors the proven
pattern in trivy.yml.
DAT-22876
|
Claude finished @jandroav's task in 58s —— View job Code Review
|
Move secure_image_name computation to set-matrix step outputs to avoid ternary '&&/||' pattern in reusable workflow with: inputs. Also remove '|| empty-string' fallback from secure-version input (reusable default handles the empty case). Both patterns can trigger startup_failure on GitHub's static parse validation. DAT-22876
|
Claude finished @jandroav's task in 34s —— View job Code ReviewFindings2 Issues Remaining:
Status on Previous Findings:
|
…if: gates
The contains(fromJSON('[...]')) pattern may trigger GitHub's static
parse validation on job-level if: conditions for reusable workflow
callers. Replace with explicit equality checks joined by || operators.
DAT-22876
|
Claude finished @jandroav's task in 47s —— View job Code Review3 Critical Issues Found (Cannot fix due to GitHub App permissions on
|
…lure Remove needs on set-matrix from vuln-scan-secure to avoid potential GitHub Actions constraint on reusable-caller depending on another job that also chains needs from a reusable. Use static image_name for reporting (does not affect scan target). DAT-22876
|
Claude finished @jandroav's task in 40s —— View job Code Review3 issues found requiring fixes before merge:
✅ Verified Working:
|
… if: GitHub Actions may not allow 'inputs.*' context in job-level if: for reusable workflow callers. Compute per-target build flags (build_community, build_alpine, build_secure) as set-matrix outputs and gate subsequent reusable caller jobs via needs.set-matrix.outputs.* comparisons instead. DAT-22876
|
Claude finished @jandroav's task in 37s —— View job Code Review3 issues found in workflow refactoring:
✅ Verified working:
|
|
Claude finished @jandroav's task in 47s —— View job Code Review🔴 2 Critical Issues Found1. trivy.yml:95 — Incomplete cancel guard if: |
always() &&
github.event_name != 'pull_request' &&
needs.scan-community.result != 'cancelled' &&
needs.scan-alpine.result != 'cancelled' &&
needs.scan-secure.result != 'cancelled'2. publish-liquibase-secure-readme.yml:18 — Excessive permissions permissions:
contents: read # Changed from: contents: write
id-token: write✅ Verified Working Correctly
|
|
Claude finished @jandroav's task in 39s —— View job Code ReviewOutstanding Issues (3 Critical)I've verified the current state of the PR and found 3 critical issues that persist and must be fixed before merge. Unfortunately, I cannot modify 1. build-qa-docker.yml: Lines 147, 156, 163, 172, 179, 188 — Inconsistent Reusable Version Pin 🔴The vulnerability scan jobs use # Current (Lines 147, 163, 179)
uses: liquibase/build-logic/.github/workflows/reusable-vulnerability-scan.yml@main
build_logic_ref: main
# Should be
uses: liquibase/build-logic/.github/workflows/reusable-vulnerability-scan.yml@dat-22876-reusables
build_logic_ref: dat-22876-reusablesImpact: Build jobs (90, 109, 128) correctly use 2. publish-liquibase-secure-readme.yml: Line 18 — Excessive Permissions 🟡Grants # Current
permissions:
contents: write # ← Unnecessary
id-token: write
# Should be (matches publish-oss-readme.yml — commit 4819e1e)
permissions:
contents: read
id-token: writeImpact: Violates least-privilege principle. Reusable workflow declaration requires only 3. trivy.yml: Line 95 — Incomplete Cancel Guard 🔴The # Current
if: always() && github.event_name != 'pull_request' && needs.scan-community.result != 'cancelled'
# Should be (CodeRabbit suggestion)
if: |
always() &&
github.event_name != 'pull_request' &&
needs.scan-community.result != 'cancelled' &&
needs.scan-alpine.result != 'cancelled' &&
needs.scan-secure.result != 'cancelled'Impact: If Alpine or Secure scans are cancelled, partial scan results will persist to scan-results branch due to incomplete guard condition. ✅ Verified Working Correctly
Note on LimitationsI cannot directly modify |
Test whether mixing @dat-22876-reusables and @main refs causes startup_failure. DAT-22876
|
Claude finished @jandroav's task in 28s —— View job Code Review✅ Issues Fixed
❌ Critical Issues Remaining1. publish-liquibase-secure-readme.yml:18 — Excessive permissions 🔴 permissions:
- contents: write
+ contents: read
id-token: write2. trivy.yml:95 — Incomplete cancel guard 🔴 if: always() && github.event_name != 'pull_request' && needs.scan-community.result != 'cancelled'
+ needs.scan-alpine.result != 'cancelled' &&
+ needs.scan-secure.result != 'cancelled'✅ Verified Working
🚫 LimitationI cannot modify |
|
Claude finished @jandroav's task in 39s —— View job Code Review📊 Status: 2 Critical Issues RemainingAll previous issues have been addressed except for 2 critical issues that must be fixed before merge. I cannot modify ✅ Issues Fixed
❌ Critical Issues Remaining1. publish-liquibase-secure-readme.yml:18 — Excessive permissions 🔴 The workflow grants permissions:
- contents: write
+ contents: read
id-token: write2. trivy.yml:95 — Incomplete cancel guard 🔴 The - if: always() && github.event_name != 'pull_request' && needs.scan-community.result != 'cancelled'
+ if: |
+ always() &&
+ github.event_name != 'pull_request' &&
+ needs.scan-community.result != 'cancelled' &&
+ needs.scan-alpine.result != 'cancelled' &&
+ needs.scan-secure.result != 'cancelled'✅ Verified Working Correctly
Note: Please manually fix these 2 issues directly in GitHub (edit the files in the UI or push new commits) since I cannot modify workflow files. |
|
Claude finished @jandroav's task in 46s —— View job Code ReviewTask Checklist
🔴 Critical Issues Found: 21. trivy.yml:95 — Incomplete Cancel GuardThe if: always() && github.event_name != 'pull_request' && needs.scan-community.result != 'cancelled'Risk: If Alpine or Secure scans are cancelled, partial scan results will persist to the Fix Required: Check all three scan jobs: if: |
always() &&
github.event_name != 'pull_request' &&
needs.scan-community.result != 'cancelled' &&
needs.scan-alpine.result != 'cancelled' &&
needs.scan-secure.result != 'cancelled'2. publish-liquibase-secure-readme.yml:18 — Excessive PermissionsWorkflow grants Fix Required: Change to permissions:
contents: read # Changed from: contents: write
id-token: write✅ Verified Working Correctly
|
DAT-22876
|
Claude finished @jandroav's task in 53s —— View job Code Review2 critical issues found requiring fixes before merge:
Verified working correctly:
Inline code suggestions provided for both issues above. |
|
Claude finished @jandroav's task in 55s —— View job Code Review🔴 Critical Issues Found: 21. publish-liquibase-secure-readme.yml:18 — Excessive PermissionsThe workflow grants Fix needed: Change to permissions:
- contents: write
+ contents: read
id-token: write2. trivy.yml:95 — Incomplete Cancel GuardThe Fix needed: Check all three scan jobs: - if: always() && github.event_name != 'pull_request' && needs.scan-community.result != 'cancelled'
+ if: |
+ always() &&
+ github.event_name != 'pull_request' &&
+ needs.scan-community.result != 'cancelled' &&
+ needs.scan-alpine.result != 'cancelled' &&
+ needs.scan-secure.result != 'cancelled'
|
| default: false | ||
|
|
||
| permissions: | ||
| contents: write |
There was a problem hiding this comment.
🔴 Excessive permissions: Workflow grants contents: write but the reusable workflow only reads the README file and updates Docker Hub via API—it performs no repository mutations. This should be contents: read per least-privilege principle (see publish-oss-readme.yml line 18 which correctly has contents: read).
| contents: write | |
| permissions: | |
| contents: read | |
| id-token: write |
| needs: [vulnerability-scan, scout] | ||
| if: always() && github.event_name != 'pull_request' && needs.vulnerability-scan.result != 'cancelled' | ||
| needs: [scan-community, scan-alpine, scan-secure] | ||
| if: always() && github.event_name != 'pull_request' && needs.scan-community.result != 'cancelled' |
There was a problem hiding this comment.
🔴 Incomplete cancel guard: Condition only checks needs.scan-community.result != 'cancelled' but the job depends on all three scan jobs (scan-community, scan-alpine, scan-secure). If Alpine or Secure scans are cancelled (e.g., workflow interruption), partial scan results will persist to the scan-results branch. Must check all three scan jobs:
| if: always() && github.event_name != 'pull_request' && needs.scan-community.result != 'cancelled' | |
| needs: [scan-community, scan-alpine, scan-secure] | |
| if: | | |
| always() && | |
| github.event_name != 'pull_request' && | |
| needs.scan-community.result != 'cancelled' && | |
| needs.scan-alpine.result != 'cancelled' && | |
| needs.scan-secure.result != 'cancelled' |
|
Claude finished @jandroav's task in 1m 1s —— View job Code Review🔴 2 Critical Issues Found & Fixed1. publish-liquibase-secure-readme.yml:18 — Excessive permissions ✅
2. trivy.yml:95 — Incomplete cancel guard ✅
Commit StatusChanges committed locally as: However, I'm unable to push to the remote branch due to GitHub App permissions. You can complete the push with: git push origin dat-22876-extract-reusable-docker-workflows✅ Verified Working Correctly
|
|
Claude finished @jandroav's task in 43s —— View job Code Review🔴 3 Critical Issues RemainingI've verified the current state of the PR. All 3 critical issues identified in previous reviews remain unresolved: 1. publish-liquibase-secure-readme.yml:18 — Excessive PermissionsWorkflow grants Required fix: Change line 18 from permissions:
contents: read # ← Change from: contents: write
id-token: write2. trivy.yml:95 — Incomplete Cancel GuardThe Required fix: Update line 95 to check all three scan jobs: if: |
always() &&
github.event_name != 'pull_request' &&
needs.scan-community.result != 'cancelled' &&
needs.scan-alpine.result != 'cancelled' &&
needs.scan-secure.result != 'cancelled'3. build-qa-docker.yml:140, 149 — Inconsistent Reusable Version PinThe Required fixes:
|
…n reusable) DAT-22876
|
Claude finished @jandroav's task in 44s —— View job Code Review🔴 2 Critical Issues RemainingThese issues were identified in prior reviews and are still present in the code: 1. publish-liquibase-secure-readme.yml:18 — Excessive permissions
2. trivy.yml:95 — Incomplete cancel guard
✅ Verified Working Correctly
|
…vents:write
Root cause found: missing 'security-events: write' top-level permission.
GitHub's static parse validation rejects caller workflows that call
reusable-vulnerability-scan.yml (which declares security-events: write at
job level) when the caller's top-level permissions block doesn't include it.
This causes startup_failure before any job runs.
Full structure:
- set-matrix: computes RC flag, image names, per-target build flags as outputs
- build-qa-{community,alpine,secure}: gated on set-matrix outputs via needs.*.outputs
- vuln-scan-{community,alpine,secure}: gated on corresponding build job success
- cleanup-ghcr-{community,alpine,secure}: always-run cleanup
Eliminates dynamic strategy.matrix + uses: combination that caused the
original startup_failure. Mirrors trivy.yml pattern with explicit named jobs.
DAT-22876
| default: false | ||
|
|
||
| permissions: | ||
| contents: write |
There was a problem hiding this comment.
🔴 Excessive permissions: Reusable workflow only reads README and updates Docker Hub API; performs no repository mutations. Should grant contents: read per least-privilege principle.
| contents: write | |
| permissions: | |
| contents: read | |
| id-token: write |
| needs: [vulnerability-scan, scout] | ||
| if: always() && github.event_name != 'pull_request' && needs.vulnerability-scan.result != 'cancelled' | ||
| needs: [scan-community, scan-alpine, scan-secure] | ||
| if: always() && github.event_name != 'pull_request' && needs.scan-community.result != 'cancelled' |
There was a problem hiding this comment.
🔴 Incomplete cancel guard: Condition only checks scan-community but job depends on all three scans. If Alpine or Secure scans cancel, partial results will persist to scan-results branch. Must check all three scan jobs.
| if: always() && github.event_name != 'pull_request' && needs.scan-community.result != 'cancelled' | |
| needs: [scan-community, scan-alpine, scan-secure] | |
| if: | | |
| always() && | |
| github.event_name != 'pull_request' && | |
| needs.scan-community.result != 'cancelled' && | |
| needs.scan-alpine.result != 'cancelled' && | |
| needs.scan-secure.result != 'cancelled' |
|
Claude finished @jandroav's task in 45s —— View job Code Review🔴 3 Critical Issues RemainingAll three issues identified in previous reviews persist and must be fixed before merge. Unfortunately, I cannot modify 1. publish-liquibase-secure-readme.yml:18 — Excessive PermissionsThe workflow grants Current (line 18): permissions:
contents: write
id-token: writeRequired fix: permissions:
contents: read
id-token: write2. build-qa-docker.yml:172, 181, 191, 200, 209, 218 — Inconsistent Reusable Version PinsThe vulnerability scan jobs ( Examples:
Impact: When the producer PR merges and this branch updates to 3. trivy.yml:95 — Incomplete Cancel GuardThe Current (line 95): if: always() && github.event_name != 'pull_request' && needs.scan-community.result != 'cancelled'Required fix: if: |
always() &&
github.event_name != 'pull_request' &&
needs.scan-community.result != 'cancelled' &&
needs.scan-alpine.result != 'cancelled' &&
needs.scan-secure.result != 'cancelled'✅ Verified Working Correctly
|
…erge liquibase/build-logic#555 merged — flip all @dat-22876-reusables refs to @main across all 6 caller workflows. No functional change expected; re-validation via workflow_dispatch confirms @main resolves identically. DAT-22876
|
Claude finished @jandroav's task in 41s —— View job Code Review🔴 3 Critical Issues RemainingAll three issues identified in prior reviews persist and must be fixed before merge. Due to GitHub App permissions, I cannot directly modify 1. publish-liquibase-secure-readme.yml:18 — Excessive PermissionsWorkflow grants Current: Line 18 = 2. trivy.yml:95 — Incomplete Cancel GuardThe Current: if: |
always() &&
github.event_name != 'pull_request' &&
needs.scan-community.result != 'cancelled' &&
needs.scan-alpine.result != 'cancelled' &&
needs.scan-secure.result != 'cancelled'3. build-qa-docker.yml:172, 181, 191, 200, 210, 219 — Vulnerability Scan Reusable ReferenceThe vulnerability scan jobs (
|
Summary
Rewire 6 CI/CD workflows to call reusables in
liquibase/build-logic. No Dockerfile moves — this is the first change under epic DAT-22522 (Dockerfile migration), a spike that validates the reusable-workflow contract while this repo remains the Dockerfile owner.create-release.yml— 570 → 348 lines; matrix items become 3 named build jobs callingreusable-docker-build, publish job callsreusable-docker-publishtest.yml— 801 → 45 lines; delegates toreusable-docker-testper matrix itemtrivy.yml— 603 → 186 lines; delegates toreusable-docker-scan(absorbsdispatch-new-cvescaller job)build-qa-docker.yml— 669 → 157 lines; delegates build toreusable-docker-build-qa(QA artifact flow preserved verbatim);set-matrix,vulnerability-scan,cleanup-ghcrjobs kept in callerpublish-oss-readme.yml— 49 → 21 lines; thin caller ofreusable-docker-readmepublish-liquibase-secure-readme.yml— 50 → 22 lines; sameNet: -1943 lines across 6 workflows.
Preserved
repository_dispatchtrigger types (liquibase-release,liquibase-secure-release) oncreate-release.ymlon: push: paths:filter on both readme workflowsworkflow_dispatchinputs (releaseType, dryRun, QA selectors)--certificate-identity-regexptarget:^https://github\.com/liquibase/docker/.*(unchanged — customer-safe)Validation branch pin
All
uses:lines pin@dat-22876-reusables. After the build-logic PR merges, this PR will get a follow-up commit flipping to@main.Producer PR
liquibase/build-logic — reusable workflows — adds 6 reusable workflows + shared assets
Test plan
workflow_dispatchtest.ymlon this branch — green ubuntu + macos × 3 Dockerfilesworkflow_dispatchtrivy.ymlon this branch — Trivy + Scout + VEX for secureworkflow_dispatchbuild-qa-docker.yml"All (Community + Alpine + Secure)"workflow_dispatchcreate-release.ymldryRun=truereleaseType=liquibase-secure-release— verify cosign signing on dry-run ECR imageworkflow_dispatchcreate-release.ymldryRun=truereleaseType=liquibase-release— community dry-runliquibase/liquibase*orliquibase/liquibase-secure*)@dat-22876-reusables→@mainafter producer PR merges; re-run key workflowsJira
DAT-22876 (parent epic DAT-22522)
Related
liquibase/docker(final step)