Skip to content

Add: JSON HTTP model loader for dynamic configuration from HTTP endpoints #44

Add: JSON HTTP model loader for dynamic configuration from HTTP endpoints

Add: JSON HTTP model loader for dynamic configuration from HTTP endpoints #44

Workflow file for this run

name: PR Docker Build
on:
pull_request:
types: [opened, synchronize]
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile.build
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/${{ github.repository_owner }}/n8n-openai-bridge:pr-${{ github.event.pull_request.number }}
build-args: |
VERSION=pr-${{ github.event.pull_request.number }}
BUILD_DATE=${{ github.event.repository.updated_at }}
VCS_REF=${{ github.sha }}
DESCRIPTION=PR #${{ github.event.pull_request.number }} - ${{ github.event.pull_request.title }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Comment on PR
uses: actions/github-script@v7
with:
script: |
const prNumber = context.issue.number;
const imageName = `ghcr.io/${{ github.repository_owner }}/n8n-openai-bridge:pr-${prNumber}`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Docker image for this PR is ready:\n\n\`\`\`bash\ndocker pull ${imageName}\n\`\`\`\n\nTest it locally:\n\`\`\`bash\ndocker run -d -p 3333:3333 -e BEARER_TOKEN=test-token ${imageName}\n\`\`\``
});