remove stale models, print models failing validation (#57) #23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Upload Model Configs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| id-token: write | |
| contents: read | |
| env: | |
| S3_IAM_ROLE_ARN: ${{ secrets.S3_IAM_ROLE_ARN }} | |
| jobs: | |
| build: | |
| name: Build unified JSON | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build unified JSON | |
| run: npm run build:json | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ai-models | |
| path: dist/ai-models.json | |
| upload: | |
| name: Upload to S3 | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Download artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ai-models | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ env.S3_IAM_ROLE_ARN }} | |
| aws-region: eu-west-1 | |
| - name: Upload to S3 | |
| run: aws s3 cp ai-models.json s3://${{ secrets.BUCKET_NAME }}/llm-gateway/v2/devtest/ai-models.json |