ci: restore branch gates and make changelog a downloadable artifact
All checks were successful
CI / Format (push) Successful in 6m32s
CI / Clippy (push) Successful in 2m17s
CI / Tests (push) Successful in 3m0s
CI / Build & Push Image (push) Has been skipped
CI / Changelog (push) Has been skipped
CI / Security Audit (pull_request) Successful in 1m51s
CI / Changelog (pull_request) Has been skipped
CI / Security Audit (push) Successful in 1m45s
CI / Format (pull_request) Successful in 7m5s
CI / Clippy (pull_request) Successful in 2m31s
CI / Tests (pull_request) Successful in 3m0s
CI / Build & Push Image (pull_request) Has been skipped

- Restore if-guards on build-and-push (main/release/* only)
- Replace changelog commit-and-push with upload-artifact
- Add if-guard back on changelog job

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Sharang Parnerkar
2026-02-18 15:25:47 +01:00
parent 7b2041f1bf
commit 70237a473f

View File

@@ -103,6 +103,9 @@ jobs:
name: Build & Push Image
runs-on: docker
needs: [test]
if: >-
github.event_name == 'push' &&
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))
steps:
- name: Checkout
run: |
@@ -147,6 +150,9 @@ jobs:
name: Changelog
runs-on: docker
needs: [test]
if: >-
github.event_name == 'push' &&
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))
container:
image: rust:1.89-bookworm
steps:
@@ -158,14 +164,8 @@ jobs:
run: cargo install git-cliff --locked
- name: Generate changelog
run: git cliff --output CHANGELOG.md
- name: Commit and push changelog
run: |
git config user.name "CI Bot"
git config user.email "ci@certifai.local"
git add CHANGELOG.md
if git diff --cached --quiet; then
echo "No changelog changes to commit"
else
git commit -m "docs: update CHANGELOG.md [skip ci]"
git push origin HEAD:"${GITHUB_REF_NAME}"
fi
- name: Upload changelog artifact
uses: actions/upload-artifact@v4
with:
name: changelog
path: CHANGELOG.md