Files
workflows/.github/workflows/orchestratorci-cleanup.yml

38 lines
1.0 KiB
YAML

name: OrchestratorCI
on:
workflow_call:
inputs:
droplet_id:
required: true
type: string
secrets:
DO_TOKEN:
required: true
outputs:
done:
description: "The result of the orchestrator job"
value: ${{ jobs.cleanup.outputs.done }} # Gunakan jobs
jobs:
cleanup:
runs-on: gitea-orchestrator
name: OrchestratorCI Cleanup Job
outputs:
done: ${{ steps.cleanup.outputs.done }} # Sesuaikan nama
steps:
- name: Run Cleanup OrchestratorCI
id: cleanup
env:
DROPLET_ID: ${{ inputs.droplet_id }}
DO_TOKEN: ${{ secrets.DO_TOKEN }}
run: |
wget https://github.com/digitalocean/doctl/releases/download/v1.141.0/doctl-1.141.0-linux-amd64.tar.gz
tar -xvf doctl-1.141.0-linux-amd64.tar.gz
mv doctl /usr/local/bin
curl https://git.btwazure.com/btwedutech/workflows/raw/branch/main/orchestrator/cleanup.sh -o cleanup.sh
chmod +x cleanup.sh
./cleanup.sh