mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-04 22:21:46 +09:00
ci(workflows): run push and schedule workflows only in cozystack/cozystack
A private copy of the repository, used to verify an embargoed security fix because GitHub runs no CI in an advisory's temporary fork, receives every workflow file with each sync. Without a repository guard, each sync and each cron tick there would build, publish, prune and cut releases with that copy's credentials. Pull request events stay allowed in the workflows that also check pull requests, since checking the fix is what the copy is for. Every job carries the guard rather than only the root jobs, because a job whose condition calls a status function runs even when the job it needs was skipped. A contract test holds new push and schedule workflows to the same rule. It reads 'on' in every form GitHub accepts, requires whatever follows the guard to be one parenthesized group, because && binds tighter than || and a trailing '|| (...)' would reopen the job, and fails on a workflow it cannot parse instead of leaving that workflow unchecked. Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io> Assisted-by: LLM
This commit is contained in:
1 parent
86ad3870d1
commit
d6a4835ea5
19 files changed
+231
-15
No files matched your search
@@ -21,6 +21,7 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
if: (github.event_name == 'pull_request' || github.repository == 'cozystack/cozystack')
|
||||
name: Analyze (${{ matrix.language }})
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 120
|
||||
|
||||
Reference in new issue
Block a user