fix: update orchestrator CI to rename job and adjust inputs for cleanup process
This commit is contained in:
30
.github/workflows/orchestratorci-cleanup.yml
vendored
30
.github/workflows/orchestratorci-cleanup.yml
vendored
@@ -3,14 +3,36 @@ name: OrchestratorCI
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
runner_id:
|
droplet_id:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
DO_TOKEN:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
done:
|
||||||
|
description: "The result of the orchestrator job"
|
||||||
|
value: ${{ jobs.cleanup.outputs.done }} # Gunakan jobs
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
provisioning:
|
cleanup:
|
||||||
runs-on: gitea-orchestrator
|
runs-on: gitea-orchestrator
|
||||||
name: OrchestratorCI Cleanup Job
|
name: OrchestratorCI Cleanup Job
|
||||||
|
outputs:
|
||||||
|
done: ${{ steps.cleanup.outputs.done }} # Sesuaikan nama
|
||||||
steps:
|
steps:
|
||||||
- name: Run OrchestratorCI
|
- name: Run Cleanup OrchestratorCI
|
||||||
|
id: cleanup
|
||||||
|
env:
|
||||||
|
DROPLET_ID: ${{ inputs.droplet_id }}
|
||||||
|
DO_TOKEN: ${{ secrets.DO_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
echo "Cleanup Sucess for runner_id: ${{ inputs.runner_id }}"
|
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
|
||||||
Reference in New Issue
Block a user