remove param (#646) #414
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: | |
| validate: | |
| name: Validate before build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Validate (yamllint) | |
| run: pip install yamllint && yamllint -c .yamllint.yml providers/ | |
| - name: Set up CUE | |
| uses: cue-lang/setup-cue@v1.0.1 | |
| - name: Validate (CUE) | |
| run: ./.github/test/validate.sh | |
| build: | |
| name: Build unified JSON | |
| runs-on: ubuntu-latest | |
| needs: validate | |
| 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 DevTest | |
| run: aws s3 cp ai-models.json s3://${{ secrets.BUCKET_NAME }}/llm-gateway/v2/devtest/ai-models.json | |
| - name: Upload to S3 Production | |
| run: aws s3 cp ai-models.json s3://${{ secrets.BUCKET_NAME }}/llm-gateway/v2/prod/ai-models.json |