ci: gate publish jobs on commit message deploy directives
Some checks are pending
Publish / backend (push) Waiting to run
CI / fmt (push) Successful in 33s
Publish / frontend (push) Successful in 45s
CI / clippy (push) Successful in 1m43s
CI / check (push) Successful in 1m44s

Publish jobs now only run when the commit message contains:
- "deploy: frontend" — deploys frontend only
- "deploy: backend" — deploys backend only
- "deploy: backend, frontend" or "deploy: frontend, backend" — both

Case-insensitive matching. Commits without a deploy directive
will only run CI (check/fmt/clippy), not publish.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-07 13:24:44 +03:00
parent edb6853e3a
commit f62084eac7

View File

@@ -10,6 +10,16 @@ env:
jobs: jobs:
frontend: frontend:
runs-on: rust runs-on: rust
if: >-
contains(github.event.head_commit.message, 'deploy: frontend')
|| contains(github.event.head_commit.message, 'deploy: backend, frontend')
|| contains(github.event.head_commit.message, 'deploy: frontend, backend')
|| contains(github.event.head_commit.message, 'Deploy: frontend')
|| contains(github.event.head_commit.message, 'Deploy: backend, frontend')
|| contains(github.event.head_commit.message, 'Deploy: frontend, backend')
|| contains(github.event.head_commit.message, 'Deploy: Frontend')
|| contains(github.event.head_commit.message, 'Deploy: Backend, Frontend')
|| contains(github.event.head_commit.message, 'Deploy: Frontend, Backend')
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -37,6 +47,16 @@ jobs:
backend: backend:
runs-on: rust runs-on: rust
if: >-
contains(github.event.head_commit.message, 'deploy: backend')
|| contains(github.event.head_commit.message, 'deploy: backend, frontend')
|| contains(github.event.head_commit.message, 'deploy: frontend, backend')
|| contains(github.event.head_commit.message, 'Deploy: backend')
|| contains(github.event.head_commit.message, 'Deploy: backend, frontend')
|| contains(github.event.head_commit.message, 'Deploy: frontend, backend')
|| contains(github.event.head_commit.message, 'Deploy: Backend')
|| contains(github.event.head_commit.message, 'Deploy: Backend, Frontend')
|| contains(github.event.head_commit.message, 'Deploy: Frontend, Backend')
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4