Skip to content

Modular logistics and supply chain operating system (LSOS)

updated docker-compose to use latest images, patched osx binary build script, experimenting with artifact upload for binaries

Ronald A. Richardson92170c965e8a
diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml
index 82d3c0c0..dd6ed44f 100644
--- a/.github/workflows/build-binaries.yml
+++ b/.github/workflows/build-binaries.yml
@@ -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: 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: 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: Build Linux binary
+ run: |
+ chmod +x ./builds/linux/build-linux.sh
+ ./builds/linux/build-linux.sh
- # - 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
+ - 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 }}
- 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
\ No newline at end of file
+ files: |
+ ${{ env.DIST_DIR }}/fleetbase-darwin-arm64
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
\ No newline at end of file
diff --git a/builds/osx/build-osx.sh b/builds/osx/build-osx.sh
index 0e09d94e..05eec31f 100755
--- a/builds/osx/build-osx.sh
+++ b/builds/osx/build-osx.sh
@@ -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
diff --git a/docker-compose.yml b/docker-compose.yml
index 7c7d5a26..80f7f4dd 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -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"