fix: workflow dispatch ref dari main ke stg
Publish dan re-pull workflow harus di-trigger dari branch stg, bukan main, agar kode yang di-build sesuai dengan yang di-deploy ke stg.
This commit is contained in:
@@ -21,7 +21,7 @@ async function triggerWorkflow(workflow: string, inputs: Record<string, string>)
|
||||
const res = await fetch(`${BASE_URL}/actions/workflows/${workflow}/dispatches`, {
|
||||
method: 'POST',
|
||||
headers: ghHeaders,
|
||||
body: JSON.stringify({ ref: 'main', inputs }),
|
||||
body: JSON.stringify({ ref: 'stg', inputs }),
|
||||
})
|
||||
if (!res.ok) throw new Error(`GitHub API error ${res.status}: ${await res.text()}`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user