Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Trying something new

Daniel Hougaarda6e4e3c69a40
diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml
index bb3d11a7ba..a02c319066 100644
--- a/.github/workflows/build-binaries.yml
+++ b/.github/workflows/build-binaries.yml
@@ -17,39 +17,38 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
- arch:
- - x64
- - arm64
- node-version:
- - 18
- os:
- - linux
- - macos
- - win
+ arch: [x64, arm64]
+ os: [linux, macos, win]
+ include:
+ - os: linux
+ docker-image: node:18-buster
+ - os: macos
+ docker-image: node:18-buster
+ - os: win
+ docker-image: node:18-buster
steps:
- name: Checkout code
uses: actions/checkout@v3
- - name: Setup Node.js
- uses: actions/setup-node@v3
- with:
- node-version: ${{ matrix.node-version }}
-
- - name: Install pkg
- run: npm install -g pkg
-
- - name: Install dependencies (backend)
- run: npm install
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v1
- - name: Install dependencies (frontend)
- run: npm install --prefix ../frontend
-
- - name: Prerequisites for pkg
- run: npm run binary:build
-
- - name: Package into node binary
- run: pkg --no-bytecode --public-packages \"*\" --public --target host --output ./binary/infisical-${{ matrix.os }}-${{ matrix.arch }} .
+ - name: 🐋 Login to Docker Hub
+ uses: docker/login-action@v2
+ with:
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
+
+ - name: Build with Docker
+ run: |
+ docker run --rm \
+ --platform=${{ matrix.os }} \
+ -v ${{ github.workspace }}/backend:/workspace/backend \
+ -v ${{ github.workspace }}/frontend:/workspace/frontend \
+ -w /workspace/backend \
+ ${{ matrix.docker-image }} \
+ bash -c "npm install -g pkg && npm install && npm install --prefix ../frontend && npm run binary:build && pkg --no-bytecode --public-packages \"*\" --public --target node18-${{ matrix.os }}-${{ matrix.arch }} --output ./binary/infisical-${{ matrix.os }}-${{ matrix.arch }} ."
- name: List files
run: ls -la ./binary