ci: add notify-failure to auto-merge and cleanup jobs, clean up redundant env
- Add notify-failure composite action to ci/auto-merge and build-images/cleanup jobs (previously missing — failures in these jobs went unnoticed) - Remove redundant step-level CI_GITEA_API_TOKEN/CI_GITEA_USERNAME env vars now that workflow-level env: block provides them - Remove redundant step-level PYTHONPATH env (already in workflow env) - Update ADR-0003 adoption scope to reflect notify-failure coverage - Update ci-cd-workflow.md with explicit job list for notify-failure - Update CHANGELOG with bug fix and cleanup entries Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent
4fc4c5b0d8
commit
b0f912dd70
@@ -51,13 +51,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
- name: Set up environment
|
- name: Set up environment
|
||||||
env:
|
|
||||||
CI_GITEA_API_TOKEN: ${{ secrets.CI_GITEA_API_TOKEN }}
|
|
||||||
run: make setup-release
|
run: make setup-release
|
||||||
- name: Check if this is a release commit
|
- name: Check if this is a release commit
|
||||||
id: check
|
id: check
|
||||||
env:
|
|
||||||
PYTHONPATH: src
|
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate
|
||||||
python3 -m devx.ci.detect_release_commit
|
python3 -m devx.ci.detect_release_commit
|
||||||
@@ -65,9 +61,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
github.event_name == 'workflow_dispatch' ||
|
github.event_name == 'workflow_dispatch' ||
|
||||||
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' && steps.check.outputs.is-release == 'false')
|
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' && steps.check.outputs.is-release == 'false')
|
||||||
env:
|
|
||||||
CI_GITEA_API_TOKEN: ${{ secrets.CI_GITEA_API_TOKEN }}
|
|
||||||
CI_GITEA_USERNAME: ${{ vars.CI_GITEA_USERNAME }}
|
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate
|
||||||
_TOKEN="$CI_GITEA_API_TOKEN"
|
_TOKEN="$CI_GITEA_API_TOKEN"
|
||||||
@@ -79,10 +72,6 @@ jobs:
|
|||||||
if: >-
|
if: >-
|
||||||
github.event_name == 'workflow_dispatch' ||
|
github.event_name == 'workflow_dispatch' ||
|
||||||
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' && steps.check.outputs.is-release == 'false')
|
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' && steps.check.outputs.is-release == 'false')
|
||||||
env:
|
|
||||||
CI_GITEA_API_TOKEN: ${{ secrets.CI_GITEA_API_TOKEN }}
|
|
||||||
CI_GITEA_USERNAME: ${{ vars.CI_GITEA_USERNAME }}
|
|
||||||
PYTHONPATH: src
|
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate
|
||||||
export PATH="$HOME/.local/bin:$PATH"
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
@@ -126,13 +115,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
- name: Set up environment
|
- name: Set up environment
|
||||||
env:
|
|
||||||
CI_GITEA_API_TOKEN: ${{ secrets.CI_GITEA_API_TOKEN }}
|
|
||||||
run: make setup-ci
|
run: make setup-ci
|
||||||
- name: Clean up old image versions
|
- name: Clean up old image versions
|
||||||
env:
|
|
||||||
CI_GITEA_API_TOKEN: ${{ secrets.CI_GITEA_API_TOKEN }}
|
|
||||||
PYTHONPATH: src
|
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate
|
||||||
python3 -m devx.tools.clean_images \
|
python3 -m devx.tools.clean_images \
|
||||||
@@ -141,3 +125,6 @@ jobs:
|
|||||||
--name oblachno-oss/runner-images/ci-quality \
|
--name oblachno-oss/runner-images/ci-quality \
|
||||||
--name oblachno-oss/runner-images/ci-full \
|
--name oblachno-oss/runner-images/ci-full \
|
||||||
--keep 2
|
--keep 2
|
||||||
|
- uses: ./.gitea/actions/notify-failure
|
||||||
|
with:
|
||||||
|
workflow: "build-images/cleanup"
|
||||||
|
|||||||
@@ -121,7 +121,6 @@ jobs:
|
|||||||
- name: Post approval review
|
- name: Post approval review
|
||||||
env:
|
env:
|
||||||
REVIEWER_GITEA_API_TOKEN: ${{ secrets.REVIEWER_GITEA_API_TOKEN }}
|
REVIEWER_GITEA_API_TOKEN: ${{ secrets.REVIEWER_GITEA_API_TOKEN }}
|
||||||
CI_GITEA_API_TOKEN: ${{ secrets.CI_GITEA_API_TOKEN }}
|
|
||||||
PR_NUMBER: ${{ github.event.number }}
|
PR_NUMBER: ${{ github.event.number }}
|
||||||
REPOSITORY: ${{ github.repository }}
|
REPOSITORY: ${{ github.repository }}
|
||||||
run: |
|
run: |
|
||||||
@@ -135,7 +134,6 @@ jobs:
|
|||||||
--body "Auto-approved: all CI checks passed (validate job)."
|
--body "Auto-approved: all CI checks passed (validate job)."
|
||||||
- name: Squash merge with task ID
|
- name: Squash merge with task ID
|
||||||
env:
|
env:
|
||||||
CI_GITEA_API_TOKEN: ${{ secrets.CI_GITEA_API_TOKEN }}
|
|
||||||
VIKUNJA_TOKEN: ${{ secrets.VIKUNJA_TOKEN }}
|
VIKUNJA_TOKEN: ${{ secrets.VIKUNJA_TOKEN }}
|
||||||
DEVX_VIKUNJA_PROJECT_ID: "8"
|
DEVX_VIKUNJA_PROJECT_ID: "8"
|
||||||
HEAD_REF: ${{ github.head_ref }}
|
HEAD_REF: ${{ github.head_ref }}
|
||||||
@@ -149,3 +147,6 @@ jobs:
|
|||||||
"$PR_TITLE" \
|
"$PR_TITLE" \
|
||||||
"$REPOSITORY" \
|
"$REPOSITORY" \
|
||||||
"$PR_NUMBER"
|
"$PR_NUMBER"
|
||||||
|
- uses: ./.gitea/actions/notify-failure
|
||||||
|
with:
|
||||||
|
workflow: "ci/auto-merge"
|
||||||
|
|||||||
@@ -111,8 +111,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
extras: "release"
|
extras: "release"
|
||||||
- name: Configure git
|
- name: Configure git
|
||||||
env:
|
|
||||||
CI_GITEA_API_TOKEN: ${{ secrets.CI_GITEA_API_TOKEN }}
|
|
||||||
run: |
|
run: |
|
||||||
git config user.name "devx-ci-bot"
|
git config user.name "devx-ci-bot"
|
||||||
git config user.email "devx-ci-bot@oblachno.fyi"
|
git config user.email "devx-ci-bot@oblachno.fyi"
|
||||||
@@ -121,16 +119,12 @@ jobs:
|
|||||||
- name: Run release
|
- name: Run release
|
||||||
id: release-tag
|
id: release-tag
|
||||||
if: needs.detect-and-configure.outputs.is-release == 'false' && needs.detect-and-configure.outputs.user-facing-changed == 'true'
|
if: needs.detect-and-configure.outputs.is-release == 'false' && needs.detect-and-configure.outputs.user-facing-changed == 'true'
|
||||||
env:
|
|
||||||
CI_GITEA_API_TOKEN: ${{ secrets.CI_GITEA_API_TOKEN }}
|
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate 2>/dev/null || true
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
export PATH="$HOME/.local/bin:$PATH"
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
python3 -m devx.ci.release
|
python3 -m devx.ci.release
|
||||||
- name: Build and publish release
|
- name: Build and publish release
|
||||||
if: steps.release-tag.outputs.tag != ''
|
if: steps.release-tag.outputs.tag != ''
|
||||||
env:
|
|
||||||
CI_GITEA_API_TOKEN: ${{ secrets.CI_GITEA_API_TOKEN }}
|
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate 2>/dev/null || true
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
export PATH="$HOME/.local/bin:$PATH"
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
@@ -140,8 +134,6 @@ jobs:
|
|||||||
# --- sync-wiki + vikunja (skip on automated/release commits) ---
|
# --- sync-wiki + vikunja (skip on automated/release commits) ---
|
||||||
- name: Sync documentation to wiki
|
- name: Sync documentation to wiki
|
||||||
if: needs.detect-and-configure.outputs.is-automated == 'false'
|
if: needs.detect-and-configure.outputs.is-automated == 'false'
|
||||||
env:
|
|
||||||
CI_GITEA_API_TOKEN: ${{ secrets.CI_GITEA_API_TOKEN }}
|
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate 2>/dev/null || true
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
python3 -m devx.ci.sync_wiki --repo "${{ github.repository }}" --verify
|
python3 -m devx.ci.sync_wiki --repo "${{ github.repository }}" --verify
|
||||||
@@ -156,7 +148,6 @@ jobs:
|
|||||||
# --- badges (always run — even on release commits) ---
|
# --- badges (always run — even on release commits) ---
|
||||||
- name: Generate and push badges
|
- name: Generate and push badges
|
||||||
env:
|
env:
|
||||||
CI_GITEA_API_TOKEN: ${{ secrets.CI_GITEA_API_TOKEN }}
|
|
||||||
PRE_COMMIT_ALLOW_NO_CONFIG: "1"
|
PRE_COMMIT_ALLOW_NO_CONFIG: "1"
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate 2>/dev/null || true
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
|
|||||||
@@ -8,6 +8,12 @@ All notable changes to this project will be documented in this file.
|
|||||||
|
|
||||||
- Add composite actions (setup-env, notify-failure, quality-checks) in `.gitea/actions/`
|
- Add composite actions (setup-env, notify-failure, quality-checks) in `.gitea/actions/`
|
||||||
- Convert ci.yml, post-merge.yml, build-images.yml to use composite actions
|
- Convert ci.yml, post-merge.yml, build-images.yml to use composite actions
|
||||||
|
- Add notify-failure to ci/auto-merge and build-images/cleanup jobs (previously missing)
|
||||||
|
- Fix `make workflow-dryrun` failure: use `env` context instead of
|
||||||
|
`vars`/`secrets` in `container.credentials` (act_runner dry-run
|
||||||
|
does not populate vars/secrets)
|
||||||
|
- Remove redundant step-level `CI_GITEA_API_TOKEN`/`CI_GITEA_USERNAME`
|
||||||
|
env vars (now in workflow-level `env:` block)
|
||||||
|
|
||||||
## [0.50.4] - 2026-08-12
|
## [0.50.4] - 2026-08-12
|
||||||
|
|
||||||
|
|||||||
@@ -77,17 +77,17 @@ fresh `make setup-image` runs.
|
|||||||
|
|
||||||
- **`ci.yml` validate job**: `setup-env` + `quality-checks` +
|
- **`ci.yml` validate job**: `setup-env` + `quality-checks` +
|
||||||
`notify-failure`.
|
`notify-failure`.
|
||||||
- **`ci.yml` auto-merge job**: `setup-env` only (no quality checks,
|
- **`ci.yml` auto-merge job**: `setup-env` + `notify-failure` (no
|
||||||
no notify-failure — auto-merge failure is surfaced by the validate
|
quality checks — auto-merge only runs after validate passes).
|
||||||
job's notify-failure).
|
|
||||||
- **`post-merge.yml` detect-and-configure**: `setup-env` +
|
- **`post-merge.yml` detect-and-configure**: `setup-env` +
|
||||||
`notify-failure`.
|
`notify-failure`.
|
||||||
- **`post-merge.yml` release-and-maintain**: `setup-env` (with
|
- **`post-merge.yml` release-and-maintain**: `setup-env` (with
|
||||||
`extras: "release"`) + `notify-failure`.
|
`extras: "release"`) + `notify-failure`.
|
||||||
- **`build-images.yml` build-and-push**: `notify-failure` only. The
|
- **`build-images.yml` build-and-push**: `notify-failure` only. The
|
||||||
setup steps use `make setup-release` and `make setup-ci` (not
|
setup steps use `make setup-release` (not `make setup-image`), so
|
||||||
`make setup-image`), so `setup-env` does not apply. The cleanup job
|
`setup-env` does not apply.
|
||||||
has no notify-failure step (it only runs on build-and-push success).
|
- **`build-images.yml` cleanup**: `notify-failure` only. The setup
|
||||||
|
step uses `make setup-ci` (not `make setup-image`).
|
||||||
|
|
||||||
### Same-Repo Copies (No Cross-Repo References)
|
### Same-Repo Copies (No Cross-Repo References)
|
||||||
|
|
||||||
|
|||||||
@@ -591,3 +591,8 @@ which runs `if: failure()`. This creates a Gitea issue with the workflow
|
|||||||
name, run ID, and commit SHA, ensuring failures that would otherwise go
|
name, run ID, and commit SHA, ensuring failures that would otherwise go
|
||||||
unnoticed in the Actions tab are surfaced as issues. The issue is created
|
unnoticed in the Actions tab are surfaced as issues. The issue is created
|
||||||
via the tea CLI with a `bug` label if available.
|
via the tea CLI with a `bug` label if available.
|
||||||
|
|
||||||
|
Jobs with `notify-failure`:
|
||||||
|
- `ci/validate`, `ci/auto-merge`
|
||||||
|
- `post-merge/detect-and-configure`, `post-merge/release-and-maintain`
|
||||||
|
- `build-images/build-and-push`, `build-images/cleanup`
|
||||||
|
|||||||
Reference in New Issue
Block a user