Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

fix(ci): build nuq-postgres image for amd64 and arm64 (#3292)

Abimael Martell510460684725
diff --git a/.github/workflows/deploy-nuq-postgres.yml b/.github/workflows/deploy-nuq-postgres.yml
index 52330ce56..c7cbd166f 100644
--- a/.github/workflows/deploy-nuq-postgres.yml
+++ b/.github/workflows/deploy-nuq-postgres.yml
@@ -6,18 +6,68 @@ on:
- main
paths:
- apps/nuq-postgres/**
+ - .github/workflows/deploy-nuq-postgres.yml
workflow_dispatch:
+permissions: {}
+
jobs:
- push-app-image:
- runs-on: blacksmith-4vcpu-ubuntu-2404
+ build:
+ runs-on: ${{ matrix.runner }}
+ permissions:
+ contents: read
+ packages: write
+ strategy:
+ matrix:
+ include:
+ - platform: linux/amd64
+ runner: blacksmith-4vcpu-ubuntu-2404
+ - platform: linux/arm64
+ runner: blacksmith-4vcpu-ubuntu-2404-arm
defaults:
run:
working-directory: './apps/nuq-postgres'
steps:
- name: 'Checkout GitHub Action'
- uses: actions/checkout@main
+ uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
+
+ - name: Setup Blacksmith Builder
+ uses: useblacksmith/setup-docker-builder@ef12d5b165b596e3aa44ea8198d8fde563eab402 # v1
+
+ - name: 'Login to GitHub Container Registry'
+ uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
+ with:
+ registry: ghcr.io
+ username: ${{github.actor}}
+ password: ${{secrets.GITHUB_TOKEN}}
+ - name: Lowercase Repo Owner
+ run: |
+ echo "REPO_OWNER=${GITHUB_REPOSITORY_OWNER,,}" >>${GITHUB_ENV}
+ env:
+ GITHUB_REPOSITORY_OWNER: '${{ github.repository_owner }}'
+
+ - name: Extract platform suffix
+ run: |
+ platform=${{ matrix.platform }}
+ echo "PLATFORM_SUFFIX=${platform//\//-}" >> $GITHUB_ENV
+
+ - name: 'Build and Push Image'
+ uses: useblacksmith/build-push-action@30c71162f16ea2c27c3e21523255d209b8b538c1 # v2
+ with:
+ context: ./apps/nuq-postgres
+ push: true
+ tags: ghcr.io/${{ env.REPO_OWNER }}/nuq-postgres:${{ env.PLATFORM_SUFFIX }}
+ platforms: ${{ matrix.platform }}
+ provenance: false
+
+ manifest:
+ runs-on: blacksmith-2vcpu-ubuntu-2404
+ needs: build
+ environment: ghcr-publish
+ permissions:
+ packages: write
+ steps:
- name: 'Login to GitHub Container Registry'
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
with:
@@ -25,7 +75,15 @@ jobs:
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- - name: 'Build NuQ Postgres Image'
+ - name: Lowercase Repo Owner
+ run: |
+ echo "REPO_OWNER=${GITHUB_REPOSITORY_OWNER,,}" >>${GITHUB_ENV}
+ env:
+ GITHUB_REPOSITORY_OWNER: '${{ github.repository_owner }}'
+
+ - name: 'Create and Push Multi-Arch Manifest'
run: |
- docker build . --tag ghcr.io/firecrawl/nuq-postgres:latest
- docker push ghcr.io/firecrawl/nuq-postgres:latest
+ docker manifest create ghcr.io/${{ env.REPO_OWNER }}/nuq-postgres:latest \
+ ghcr.io/${{ env.REPO_OWNER }}/nuq-postgres:linux-amd64 \
+ ghcr.io/${{ env.REPO_OWNER }}/nuq-postgres:linux-arm64
+ docker manifest push ghcr.io/${{ env.REPO_OWNER }}/nuq-postgres:latest
diff --git a/apps/api/src/__tests__/snips/mocks/map-redirect.json b/apps/api/src/__tests__/snips/mocks/map-redirect.json
index 37a874adf..d59d118bc 100644
--- a/apps/api/src/__tests__/snips/mocks/map-redirect.json
+++ b/apps/api/src/__tests__/snips/mocks/map-redirect.json
@@ -2,14 +2,14 @@
{
"time": 1782145899000,
"options": {
- "url": "http://www.firecrawl.dev/sitemap.xml",
+ "url": "https://www.firecrawl.dev/sitemap.xml",
"method": "GET",
"ignoreResponse": false,
"ignoreFailure": false,
"tryCount": 1
},
"result": {
- "url": "http://www.firecrawl.dev/sitemap.xml",
+ "url": "https://www.firecrawl.dev/sitemap.xml",
"body": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n <url><loc>http://www.firecrawl.dev/</loc></url>\n <url><loc>http://www.firecrawl.dev/about</loc></url>\n <url><loc>http://www.firecrawl.dev/blog</loc></url>\n</urlset>",
"status": 200,
"headers": [["content-type", "application/xml"]]