9d2994a4aa
BREAKING CHANGE: Workflow files consolidated with proper dependencies - Create new unified CI pipeline (.github/workflows/ci.yml) - Multi-stage pipeline: test/lint/mypy → build → deploy - Add concurrency groups to cancel redundant PR runs - Fix bug: only push Docker images on push events (not PRs) - Fix bug: upgrade checkout action from v3 to v4 - Fix bug: enforce quality gates with job dependencies - Preserve Redis/RabbitMQ services for tests - Preserve Codecov integration and test artifacts - Push to both Docker Hub and GHCR with proper tags - Include SBOM and provenance attestations - Update release.yml: remove no-op "Trigger Docker Build" step - Update codeql.yml: remove template comments and boilerplate - Delete 4 redundant workflow files: - tests.yaml (merged into ci.yml) - docker-build.yaml (merged into ci.yml) - docker-ci.yml (merged into ci.yml) - deploy.yaml (merged into ci.yml) Docker registries: Docker Hub + GHCR (Quay.io auto-builds separately) Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
63 lines
1.5 KiB
YAML
63 lines
1.5 KiB
YAML
name: Semantic Release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
issues: write
|
|
pull-requests: write
|
|
packages: write
|
|
|
|
jobs:
|
|
release:
|
|
name: Semantic Release
|
|
runs-on: ubuntu-latest
|
|
if: github.repository == 'christianlouis/DocuElevate'
|
|
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
cache: 'pip'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install python-semantic-release
|
|
|
|
- name: Configure Git
|
|
run: |
|
|
git config --global user.name "github-actions[bot]"
|
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
|
|
- name: Run Semantic Release
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
semantic-release version --print
|
|
semantic-release version
|
|
semantic-release publish
|
|
|
|
- name: Update build metadata files if changed
|
|
run: |
|
|
for f in VERSION BUILD_DATE GIT_SHA RUNTIME_INFO; do
|
|
if [ -f "$f" ]; then
|
|
git add -f "$f"
|
|
fi
|
|
done
|
|
if ! git diff --staged --quiet; then
|
|
git commit -m "chore(release): update build metadata files [skip ci]"
|
|
git push
|
|
fi
|