mirror of
https://github.com/Infisical/infisical.git
synced 2026-01-10 07:58:15 -05:00
Trying something new
This commit is contained in:
51
.github/workflows/build-binaries.yml
vendored
51
.github/workflows/build-binaries.yml
vendored
@@ -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
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: 🐋 Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Install pkg
|
||||
run: npm install -g pkg
|
||||
|
||||
- name: Install dependencies (backend)
|
||||
run: npm install
|
||||
|
||||
- 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: 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
|
||||
|
||||
Reference in New Issue
Block a user