Skip to content

Use sparkfabrik action for Android build #6

Use sparkfabrik action for Android build

Use sparkfabrik action for Android build #6

Workflow file for this run

name: Build and Deploy
on:
push:
branches: [ main, elizaos-challenge ]
workflow_dispatch:
env:
DOCKER_IMAGE: ${{ secrets.DOCKER_USERNAME }}/miku
NOSANA_API_KEY: ${{ secrets.NOSANA_API_KEY }}
jobs:
build-android:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Build Android APK
uses: sparkfabrik/android-build-action@v1.5.0
with:
project-path: android
output-path: app-release.apk
- name: Upload APK Artifact
uses: actions/upload-artifact@v4
with:
name: android-apk
path: app-release.apk
- name: Create Release
if: github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ github.run_number }}
name: Release v${{ github.run_number }}
files: app-release.apk
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-and-deploy-agent:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
${{ env.DOCKER_IMAGE }}:latest
${{ env.DOCKER_IMAGE }}:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Install Nosana CLI
run: npm install -g @nosana/cli
- name: Deploy to Nosana
run: |
nosana job post \
--file ./nos_job_def/nosana_eliza_job_definition.json \
--market nvidia-3090 \
--timeout 300 \
--api ${{ env.NOSANA_API_KEY }}