mirror of
https://github.com/ansible/awx.git
synced 2026-06-20 06:07:42 -02:30
Fix skip of push operations which are still failing in mirrors (#16468)
* Fix bash operator precedence in repo ownership check The condition had || operators outside proper test block grouping, which could cause the check to fail with a shell error. Wrap the OR conditions in parentheses with explicit [[ ]] tests. Assisted-by: Claude Haiku 4.5 <noreply@anthropic.com> * Replace reusable workflow with direct if conditions for repo ownership check The reusable workflow with job dependencies had a timing/evaluation issue where jobs would still execute even when should_run=false. Using direct if conditions with github context variables (repository, ref_name) is more reliable and ensures jobs are properly skipped on fork pushes. Assisted-by: Claude Haiku 4.5 <noreply@anthropic.com> * Remove unused repo-owns-branch reusable workflow No longer needed after replacing with direct if conditions. Assisted-by: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
9
.github/workflows/upload_schema.yml
vendored
9
.github/workflows/upload_schema.yml
vendored
@@ -13,12 +13,11 @@ on:
|
||||
- feature_**
|
||||
- stable-**
|
||||
jobs:
|
||||
check-ownership:
|
||||
uses: ./.github/workflows/_repo-owns-branch.yml
|
||||
|
||||
push:
|
||||
needs: check-ownership
|
||||
if: needs.check-ownership.outputs.should_run == 'true'
|
||||
if: |
|
||||
github.event_name == 'workflow_dispatch' ||
|
||||
(github.repository == 'ansible/awx' && (github.ref_name == 'devel' || startsWith(github.ref_name, 'feature_'))) ||
|
||||
(github.repository == 'ansible/tower' && (startsWith(github.ref_name, 'stable-') || startsWith(github.ref_name, 'release_')))
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
permissions:
|
||||
|
||||
Reference in New Issue
Block a user