46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
name: OrchestratorCI
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
spec:
|
|
required: true
|
|
type: string
|
|
runner_id:
|
|
required: true
|
|
type: string
|
|
|
|
secrets:
|
|
DO_TOKEN:
|
|
required: true
|
|
SSH_PRIVATE_KEY_DECODED:
|
|
required: true
|
|
|
|
outputs:
|
|
ready:
|
|
description: "The result of the orchestrator job"
|
|
value: ${{ jobs.provisioning.outputs.ready }} # Gunakan jobs
|
|
droplet_id:
|
|
description: "The ID of the created droplet"
|
|
value: ${{ jobs.provisioning.outputs.droplet_id }}
|
|
droplet_ip:
|
|
description: "The IP address of the created droplet"
|
|
value: ${{ jobs.provisioning.outputs.droplet_ip }}
|
|
|
|
jobs:
|
|
provisioning:
|
|
runs-on: gitea-orchestrator
|
|
name: OrchestratorCI Job
|
|
outputs:
|
|
ready: ${{ steps.provisioning.outputs.ready }} # Sesuaikan nama
|
|
steps:
|
|
- name: Run OrchestratorCI
|
|
id: provisioning
|
|
container: registry.btwazure.com/orchestrator/app:latest
|
|
env:
|
|
SPEC: ${{ inputs.spec }}
|
|
RUNNER_ID: ${{ inputs.runner_id }}
|
|
DO_TOKEN: ${{ secrets.DO_TOKEN }}
|
|
SSH_PRIVATE_KEY_DECODED: ${{ secrets.SSH_PRIVATE_KEY_DECODED }}
|
|
run: |
|
|
orchestrating |