11name : CI
22on :
33 push :
4- branches-ignore :
5- - ' generated'
6- - ' codegen/**'
7- - ' integrated/**'
8- - ' stl-preview-head/**'
9- - ' stl-preview-base/**'
4+ branches :
5+ - ' **'
6+ - ' !integrated/**'
7+ - ' !stl-preview-head/**'
8+ - ' !stl-preview-base/**'
9+ - ' !generated'
10+ - ' !codegen/**'
11+ - ' codegen/stl/**'
1012 pull_request :
1113 branches-ignore :
1214 - ' stl-preview-head/**'
@@ -17,17 +19,15 @@ jobs:
1719 timeout-minutes : 10
1820 name : lint
1921 runs-on : ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
20- if : github.event_name == 'push' || github.event.pull_request.head.repo.fork
22+ if : ( github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
2123 steps :
22- - uses : actions/checkout@v6
24+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2325
24- - name : Install Rye
25- run : |
26- curl -sSf https://rye.astral.sh/get | bash
27- echo "$HOME/.rye/shims" >> $GITHUB_PATH
28- env :
29- RYE_VERSION : ' 0.44.0'
30- RYE_INSTALL_OPTION : ' --yes'
26+ - name : Set up Rye
27+ uses : eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8
28+ with :
29+ version : ' 0.44.0'
30+ enable-cache : true
3131
3232 - name : Install dependencies
3333 run : rye sync --all-features
@@ -36,23 +36,21 @@ jobs:
3636 run : ./scripts/lint
3737
3838 build :
39- if : github.event_name == 'push' || github.event.pull_request.head.repo.fork
39+ if : ( github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
4040 timeout-minutes : 10
4141 name : build
4242 permissions :
4343 contents : read
4444 id-token : write
4545 runs-on : ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
4646 steps :
47- - uses : actions/checkout@v6
47+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
4848
49- - name : Install Rye
50- run : |
51- curl -sSf https://rye.astral.sh/get | bash
52- echo "$HOME/.rye/shims" >> $GITHUB_PATH
53- env :
54- RYE_VERSION : ' 0.44.0'
55- RYE_INSTALL_OPTION : ' --yes'
49+ - name : Set up Rye
50+ uses : eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8
51+ with :
52+ version : ' 0.44.0'
53+ enable-cache : true
5654
5755 - name : Install dependencies
5856 run : rye sync --all-features
@@ -61,14 +59,18 @@ jobs:
6159 run : rye build
6260
6361 - name : Get GitHub OIDC Token
64- if : github.repository == 'stainless-sdks/openai-python'
62+ if : |-
63+ github.repository == 'stainless-sdks/openai-python' &&
64+ !startsWith(github.ref, 'refs/heads/stl/')
6565 id : github-oidc
66- uses : actions/github-script@v8
66+ uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
6767 with :
6868 script : core.setOutput('github_token', await core.getIDToken());
6969
7070 - name : Upload tarball
71- if : github.repository == 'stainless-sdks/openai-python'
71+ if : |-
72+ github.repository == 'stainless-sdks/openai-python' &&
73+ !startsWith(github.ref, 'refs/heads/stl/')
7274 env :
7375 URL : https://pkg.stainless.com/s
7476 AUTH : ${{ steps.github-oidc.outputs.github_token }}
@@ -81,15 +83,13 @@ jobs:
8183 runs-on : ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
8284 if : github.event_name == 'push' || github.event.pull_request.head.repo.fork
8385 steps :
84- - uses : actions/checkout@v6
86+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
8587
86- - name : Install Rye
87- run : |
88- curl -sSf https://rye.astral.sh/get | bash
89- echo "$HOME/.rye/shims" >> $GITHUB_PATH
90- env :
91- RYE_VERSION : ' 0.44.0'
92- RYE_INSTALL_OPTION : ' --yes'
88+ - name : Set up Rye
89+ uses : eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8
90+ with :
91+ version : ' 0.44.0'
92+ enable-cache : true
9393
9494 - name : Bootstrap
9595 run : ./scripts/bootstrap
@@ -101,18 +101,16 @@ jobs:
101101 timeout-minutes : 10
102102 name : examples
103103 runs-on : ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
104- if : github.repository == 'openai/openai-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
104+ if : github.repository == 'openai/openai-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
105105
106106 steps :
107- - uses : actions/checkout@v6
107+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
108108
109- - name : Install Rye
110- run : |
111- curl -sSf https://rye.astral.sh/get | bash
112- echo "$HOME/.rye/shims" >> $GITHUB_PATH
113- env :
114- RYE_VERSION : ' 0.44.0'
115- RYE_INSTALL_OPTION : ' --yes'
109+ - name : Set up Rye
110+ uses : eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8
111+ with :
112+ version : ' 0.44.0'
113+ enable-cache : true
116114 - name : Install dependencies
117115 run : |
118116 rye sync --all-features
0 commit comments