mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
86 lines
2.9 KiB
YAML
86 lines
2.9 KiB
YAML
name: Build Debian Package
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
os:
|
|
required: true
|
|
type: string
|
|
arch:
|
|
required: true
|
|
type: string
|
|
version:
|
|
required: true
|
|
type: string
|
|
executable_path:
|
|
required: true
|
|
type: string
|
|
outputs:
|
|
deb_path:
|
|
description: "Path to the generated .deb file"
|
|
value: ${{ jobs.build.outputs.deb_path }}
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: ./backend
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
deb_path: ${{ steps.set_deb_path.outputs.deb_path }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up package structure
|
|
run: |
|
|
mkdir -p infisical-standalone/DEBIAN
|
|
mkdir -p infisical-standalone/usr/local/bin
|
|
|
|
- name: Copy executable
|
|
run: |
|
|
cp ${{inputs.executable_path}} infisical-standalone/usr/local/bin/
|
|
chmod +x infisical-standalone/usr/local/bin/infisical-${{ inputs.os }}-${{ inputs.arch }}
|
|
|
|
- name: Create control file (x64)
|
|
if: inputs.arch == 'x64'
|
|
run: |
|
|
cat <<EOF > infisical-standalone/DEBIAN/control
|
|
Package: infisical-standalone
|
|
Version: ${{ inputs.version }}
|
|
Section: base
|
|
Priority: optional
|
|
Architecture: amd64
|
|
Maintainer: Infisical <daniel@infisical.com>
|
|
Description: Infisical standalone executable (app.infisical.com)
|
|
EOF
|
|
|
|
- name: Create control file (other architectures)
|
|
if: inputs.arch != 'x64'
|
|
run: |
|
|
cat <<EOF > infisical-standalone/DEBIAN/control
|
|
Package: infisical-standalone-${{ inputs.arch }}
|
|
Version: ${{ inputs.version }}
|
|
Section: base
|
|
Priority: optional
|
|
Architecture: ${{ inputs.arch }}
|
|
Maintainer: Infisical <daniel@infisical.com>
|
|
Description: Infisical standalone executable (app.infisical.com)
|
|
EOF
|
|
|
|
- name: Set permissions
|
|
run: |
|
|
chmod 755 infisical-standalone/DEBIAN
|
|
chmod 644 infisical-standalone/DEBIAN/control
|
|
|
|
- name: Build .deb package
|
|
run: dpkg-deb --build infisical-standalone
|
|
|
|
- name: Rename package
|
|
run: mv infisical-standalone.deb infisical-linux-${{ inputs.arch }}.deb
|
|
|
|
- name: Set deb path output
|
|
id: set_deb_path
|
|
run: echo "deb_path=$(pwd)/infisical-linux-${{ inputs.arch }}.deb" >> $GITHUB_OUTPUT
|