GRM-57: fix: badges always update on release commits + fix configure-repo PYTHONPATH
This commit is contained in:
@@ -8,15 +8,18 @@ name: Post-merge
|
||||
#
|
||||
# detect-type ──┬── release (skip if release commit)
|
||||
# ├── sync-wiki (skip if release commit)
|
||||
# ├── badges (runs after release, even if it fails)
|
||||
# └── vikunja (skip if release commit)
|
||||
# ├── badges (ALWAYS runs — even on release commits)
|
||||
# ├── vikunja (skip if release commit)
|
||||
# └── configure-repo (skip if release commit)
|
||||
#
|
||||
# The badges job depends on release so it picks up the latest version
|
||||
# number. It uses `if: always()` to run even if release fails or is
|
||||
# skipped, ensuring badges always reflect the current repo state.
|
||||
# number. It uses `if: always()` with no is-release condition so it
|
||||
# runs on every push to master, including release commits. This
|
||||
# ensures badges (tests, coverage, version, etc.) are always current.
|
||||
#
|
||||
# When release.py creates a "release: vX.Y.Z" commit, all jobs skip
|
||||
# because it's a release commit. The tag push triggers publish.yml.
|
||||
# When release.py creates a "release: vX.Y.Z" commit, the release
|
||||
# commit's post-merge run still updates badges (version badge picks
|
||||
# up the new version). Other jobs skip. The tag push triggers publish.yml.
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -103,7 +106,7 @@ jobs:
|
||||
|
||||
badges:
|
||||
needs: [detect-type, release]
|
||||
if: always() && needs.detect-type.outputs.is-release == 'false'
|
||||
if: always()
|
||||
runs-on: docker
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
@@ -176,5 +179,16 @@ jobs:
|
||||
- name: Ensure branch protection and labels
|
||||
env:
|
||||
REPO_TOKEN: ${{ secrets.REPO_TOKEN }}
|
||||
PYTHONPATH: src
|
||||
PYTHONPATH: .:src
|
||||
run: python3 scripts/configure_repo.py
|
||||
- name: Notify on failure
|
||||
if: failure()
|
||||
env:
|
||||
REPO_TOKEN: ${{ secrets.REPO_TOKEN }}
|
||||
PYTHONPATH: .:src
|
||||
run: |
|
||||
python3 scripts/ci/notify_failure.py \
|
||||
--repo "${{ github.repository }}" \
|
||||
--run-id "${{ github.run_id }}" \
|
||||
--workflow "post-merge/configure-repo" \
|
||||
--commit "${{ github.sha }}"
|
||||
|
||||
Reference in New Issue
Block a user