Skip to content

Commit adf2886

Browse files
Fix ORT (#60)
Signed-off-by: Yury-Fridlyand <[email protected]>
1 parent ef54380 commit adf2886

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

.github/workflows/ort.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ permissions:
77

88
on:
99
create:
10-
ref_type: branch
11-
ref: "refs/heads/release-*"
1210
push:
13-
paths:
14-
- .github/workflows/ort.yml
11+
branches:
12+
- "release-*"
1513
pull_request:
1614
paths:
1715
- .github/workflows/ort.yml
@@ -22,10 +20,25 @@ concurrency:
2220
cancel-in-progress: true
2321

2422
jobs:
23+
check-condition:
24+
name: Check condition
25+
# workaround for https://github.com/orgs/community/discussions/54860 (`create` event filter)
26+
if: >
27+
github.repository_owner == 'valkey-io' &&
28+
(github.event_name != 'create' ||
29+
(github.event_name == 'create' &&
30+
((github.event.ref_type == 'branch' && startsWith(github.event.ref, 'release-')) ||
31+
github.event.ref_type == 'tag')
32+
)
33+
)
34+
runs-on: ubuntu-latest
35+
steps:
36+
- run:
37+
2538
run-ort:
39+
needs: [check-condition]
2640
name: Create attribution files
2741
runs-on: ubuntu-latest
28-
if: github.repository_owner == 'valkey-io'
2942
env:
3043
ATTRIBUTIONS_FILE: THIRD_PARTY_LICENSES
3144
steps:
@@ -197,7 +210,7 @@ jobs:
197210
198211
### Create PR, Note a potential race on the source branch ###
199212
- name: Create or update pull request
200-
if: ${{ env.FOUND_DIFF == 'true' && github.event_name != 'pull_request' }}
213+
if: ${{ env.FOUND_DIFF == 'true' }}
201214
run: |
202215
TARGET_BRANCH=`git branch --show-current`
203216
ORT_DIFF_BRANCH_NAME="ort-diff-for-$TARGET_BRANCH"

0 commit comments

Comments
 (0)