mirror of
https://github.com/fleetbase/fleetbase.git
synced 2025-12-19 22:27:22 +00:00
updated docker-compose to use latest images, patched osx binary build script, experimenting with artifact upload for binaries
This commit is contained in:
82
.github/workflows/build-binaries.yml
vendored
82
.github/workflows/build-binaries.yml
vendored
@@ -1,10 +1,9 @@
|
||||
name: Build Binaries
|
||||
name: Build & Publish Binaries
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
env:
|
||||
DIST_DIR: builds/dist
|
||||
@@ -15,51 +14,29 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
# - name: Run Linux build
|
||||
# run: |
|
||||
# chmod +x ./builds/linux/build-linux.sh
|
||||
# ./builds/linux/build-linux.sh
|
||||
- name: Build Linux binary
|
||||
run: |
|
||||
chmod +x ./builds/linux/build-linux.sh
|
||||
./builds/linux/build-linux.sh
|
||||
|
||||
# - name: Upload for PR testing
|
||||
# if: ${{ github.event_name == 'pull_request' }}
|
||||
# uses: actions/upload-artifact@v4
|
||||
# with:
|
||||
# name: fleetbase-api-linux-binary
|
||||
# path: ${{ env.DIST_DIR }}/fleetbase-linux-x86_64
|
||||
- name: Upload Linux binary
|
||||
if: github.event_name == 'release'
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
${{ env.DIST_DIR }}/fleetbase-linux-x86_64
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# - name: Create GitHub Release
|
||||
# if: ${{ github.event_name == 'push' }}
|
||||
# id: create_release
|
||||
# uses: actions/create-release@v1
|
||||
# with:
|
||||
# tag_name: ${{ github.ref_name }}
|
||||
# release_name: Release ${{ github.ref_name }}
|
||||
# body: |
|
||||
# • Built on ${{ github.run_started_at }}
|
||||
# • Linux and macOS static binaries
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# - name: Upload Linux to Release
|
||||
# if: ${{ github.event_name == 'push' }}
|
||||
# uses: actions/upload-release-asset@v1
|
||||
# with:
|
||||
# upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
# asset_path: ${{ env.DIST_DIR }}/fleetbase-linux-x86_64
|
||||
# asset_name: fleetbase-linux-x86_64
|
||||
# asset_content_type: application/octet-stream
|
||||
|
||||
build-osx:
|
||||
build-macos:
|
||||
name: macOS (ARM64) Build
|
||||
needs: build-linux
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
@@ -68,23 +45,16 @@ jobs:
|
||||
source "$(brew --prefix asdf)/libexec/asdf.sh"
|
||||
asdf plugin add php https://github.com/asdf-community/asdf-php.git
|
||||
|
||||
- name: Run macOS build
|
||||
- name: Build macOS binary
|
||||
run: |
|
||||
chmod +x ./builds/osx/build-osx.sh
|
||||
./builds/osx/build-osx.sh
|
||||
|
||||
- name: Upload for PR testing
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
- name: Upload macOS binary
|
||||
if: github.event_name == 'release'
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
name: fleetbase-api-macos-binary
|
||||
path: ${{ env.DIST_DIR }}/fleetbase-$(uname -s)-$(uname -m)
|
||||
|
||||
# - name: Upload macOS to Release
|
||||
# if: ${{ github.event_name == 'push' }}
|
||||
# uses: actions/upload-release-asset@v1
|
||||
# with:
|
||||
# upload_url: ${{ needs.build-linux.steps.create_release.outputs.upload_url }}
|
||||
# asset_path: ${{ env.DIST_DIR }}/fleetbase-$(uname -s)-$(uname -m)
|
||||
# asset_name: fleetbase-macos-arm64
|
||||
# asset_content_type: application/octet-stream
|
||||
files: |
|
||||
${{ env.DIST_DIR }}/fleetbase-darwin-arm64
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -46,11 +46,11 @@ fi
|
||||
# 🔁 Trap to restore PHP when script exits
|
||||
trap 'if [ "$IS_ASDF_MANAGED" = true ]; then
|
||||
log "Restoring asdf-managed PHP version: $ORIGINAL_PHP_VERSION"
|
||||
asdf set php "$ORIGINAL_PHP_VERSION"
|
||||
asdf set php "$ORIGINAL_PHP_VERSION" || true
|
||||
log "Reverted to PHP $(php -v | head -n 1)"
|
||||
else
|
||||
log "Unsetting asdf set to restore system PHP"
|
||||
asdf set php system
|
||||
asdf set php system || true
|
||||
log "Reverted to PHP $(php -v | head -n 1)"
|
||||
fi' EXIT
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ services:
|
||||
SOCKETCLUSTER_BROKERS: 10
|
||||
|
||||
scheduler:
|
||||
image: fleetbase/fleetbase-api:v0.7.0
|
||||
image: fleetbase/fleetbase-api:latest
|
||||
command: ["go-crond", "--verbose", "root:./crontab"]
|
||||
environment:
|
||||
DATABASE_URL: "mysql://root@database/fleetbase"
|
||||
@@ -43,7 +43,7 @@ services:
|
||||
REDIS_URL: tcp://cache
|
||||
|
||||
queue:
|
||||
image: fleetbase/fleetbase-api:v0.7.0
|
||||
image: fleetbase/fleetbase-api:latest
|
||||
command: ["php", "artisan", "queue:work"]
|
||||
healthcheck:
|
||||
test: ["CMD", "php", "artisan", "queue:status"]
|
||||
@@ -59,14 +59,14 @@ services:
|
||||
REDIS_URL: tcp://cache
|
||||
|
||||
console:
|
||||
image: fleetbase/fleetbase-console:v0.7.0
|
||||
image: fleetbase/fleetbase-console:latest
|
||||
ports:
|
||||
- "4200:4200"
|
||||
volumes:
|
||||
- ./console/fleetbase.config.json:/usr/share/nginx/html/fleetbase.config.json
|
||||
|
||||
application:
|
||||
image: fleetbase/fleetbase-api:v0.7.0
|
||||
image: fleetbase/fleetbase-api:latest
|
||||
environment:
|
||||
ENVIRONMENT: development
|
||||
DATABASE_URL: "mysql://root@database/fleetbase"
|
||||
|
||||
Reference in New Issue
Block a user