|
4 | 4 | push: |
5 | 5 | branches: |
6 | 6 | - main |
7 | | - paths: |
8 | | - - "generators/openapi/VERSION" |
9 | | - - 'generators/python/sdk/VERSION' |
10 | | - - 'generators/python/fastapi/VERSION' |
11 | | - - 'generators/python/pydantic/VERSION' |
12 | | - - 'generators/postman/VERSION' |
| 7 | + paths: |
| 8 | + - "generators/openapi/VERSION" |
| 9 | + - 'generators/python/sdk/VERSION' |
| 10 | + - 'generators/python/fastapi/VERSION' |
| 11 | + - 'generators/python/pydantic/VERSION' |
| 12 | + - 'generators/postman/VERSION' |
| 13 | + - 'generators/ruby/model/VERSION' |
| 14 | + - 'generators/ruby/sdk/VERSION' |
13 | 15 |
|
14 | 16 | jobs: |
15 | 17 | versions-changed: |
|
20 | 22 | fastapi: ${{ steps.filter.outputs.fastapi }} |
21 | 23 | pydantic: ${{ steps.filter.outputs.pydantic }} |
22 | 24 | postman: ${{ steps.filter.outputs.postman }} |
| 25 | + ruby-model: ${{ steps.filter.outputs.ruby-model }} |
| 26 | + ruby-sdk: ${{ steps.filter.outputs.ruby-sdk }} |
23 | 27 | steps: |
24 | 28 | - uses: dorny/paths-filter@v2 |
25 | 29 | id: filter |
|
30 | 34 | fastapi: 'generators/python/fastapi/VERSION' |
31 | 35 | pydantic: 'generators/python/pydantic/VERSION' |
32 | 36 | postman: 'generators/postman/VERSION' |
| 37 | + ruby-model: 'generators/ruby/model/VERSION' |
| 38 | + ruby-sdk: 'generators/ruby/sdk/VERSION' |
33 | 39 |
|
34 | 40 | pydantic-model: |
35 | 41 | runs-on: ubuntu-latest |
@@ -235,3 +241,85 @@ jobs: |
235 | 241 | platforms: linux/amd64,linux/arm64 |
236 | 242 | push: true |
237 | 243 | tags: fernapi/fern-postman:${{env.VERSION}} |
| 244 | + |
| 245 | + ruby-model: |
| 246 | + runs-on: ubuntu-latest |
| 247 | + needs: versions-changed |
| 248 | + if: ${{ needs.changes.outputs.ruby-model == 'true'}} |
| 249 | + steps: |
| 250 | + - name: Checkout repo |
| 251 | + uses: actions/checkout@v4 |
| 252 | + |
| 253 | + - uses: actions/setup-node@v3 |
| 254 | + with: |
| 255 | + node-version: 18 |
| 256 | + cache: "yarn" |
| 257 | + |
| 258 | + - name: Log in to Docker Hub |
| 259 | + uses: docker/login-action@v3 |
| 260 | + with: |
| 261 | + username: fernapi |
| 262 | + password: ${{ secrets.FERN_API_DOCKERHUB_PASSWORD }} |
| 263 | + |
| 264 | + - name: Build CLI |
| 265 | + working-directory: ./generators/ruby/model |
| 266 | + run: yarn dist:cli |
| 267 | + |
| 268 | + - name: Print Version |
| 269 | + run: | |
| 270 | + projectVersion=$(cat generators/ruby/model/VERSION) |
| 271 | + echo $projectVersion |
| 272 | + echo "VERSION=$projectVersion" >> $GITHUB_ENV |
| 273 | +
|
| 274 | + - name: Set up Docker Buildx |
| 275 | + uses: docker/setup-buildx-action@v1 |
| 276 | + |
| 277 | + - name: Build and push Docker image |
| 278 | + uses: docker/build-push-action@v2 |
| 279 | + with: |
| 280 | + context: . |
| 281 | + file: ./generators/ruby/model/Dockerfile |
| 282 | + platforms: linux/amd64,linux/arm64 |
| 283 | + push: true |
| 284 | + tags: fernapi/fern-ruby-model:${{env.VERSION}} |
| 285 | + |
| 286 | + ruby-sdk: |
| 287 | + runs-on: ubuntu-latest |
| 288 | + needs: versions-changed |
| 289 | + if: ${{ needs.changes.outputs.ruby-sdk == 'true'}} |
| 290 | + steps: |
| 291 | + - name: Checkout repo |
| 292 | + uses: actions/checkout@v4 |
| 293 | + |
| 294 | + - uses: actions/setup-node@v3 |
| 295 | + with: |
| 296 | + node-version: 18 |
| 297 | + cache: "yarn" |
| 298 | + |
| 299 | + - name: Log in to Docker Hub |
| 300 | + uses: docker/login-action@v3 |
| 301 | + with: |
| 302 | + username: fernapi |
| 303 | + password: ${{ secrets.FERN_API_DOCKERHUB_PASSWORD }} |
| 304 | + |
| 305 | + - name: Build CLI |
| 306 | + working-directory: ./generators/ruby/sdk |
| 307 | + run: yarn dist:cli |
| 308 | + |
| 309 | + - name: Print Version |
| 310 | + run: | |
| 311 | + projectVersion=$(cat generators/ruby/sdk/VERSION) |
| 312 | + echo $projectVersion |
| 313 | + echo "VERSION=$projectVersion" >> $GITHUB_ENV |
| 314 | +
|
| 315 | + - name: Set up Docker Buildx |
| 316 | + uses: docker/setup-buildx-action@v1 |
| 317 | + |
| 318 | + - name: Build and push Docker image |
| 319 | + uses: docker/build-push-action@v2 |
| 320 | + with: |
| 321 | + context: . |
| 322 | + file: ./generators/ruby/sdk/Dockerfile |
| 323 | + platforms: linux/amd64,linux/arm64 |
| 324 | + push: true |
| 325 | + tags: fernapi/fern-ruby-sdk:${{env.VERSION}} |
0 commit comments