Trigger Github Action Workflow by another Workflow from a Different Github Repository

In some cases, we might want to trigger github action workflow pipeline without interacting with the repository directly (trigger on push or manual trigger). For example, hiding Github Pages source code without any subscription.
Generate Personal Access Token (PAT)
Go to Your Profile Settings
After loged in to your Github account, Click on your profile picture (right top corner), then click “Settings”.
Open Developer Settings
On the left pane, scroll down untill you found “Developer Setting”.
Generate Your Token
On the left pane, click on “Personal Access Token”, it will show a dropdown list, chose “Fine-grained tokens”.
Configure the Token
Do as what I’ve marked on the image below.
PAT has been Generated
Copy and save your PAT.
Create Github Action Secret on the Triggering Workflow
Go to your triggering workflow, and create the secret there.
Repo Settings
Open settings in the triggering repo.
New Repo Secret
On the left pane, scroll down untill you found “Secrets”, then click it, and dropdown list will shown, then click “Actions”, click “New Repository Secret”.
Create Secret
Enter name “GH_PAT” as the name, and paste the PAT you’ve created before in the secret form, click “add Secret”
Secret Created
Now the secret should be created.
Create New Workflow File
Create workflow file to Trigger another Workflow on a Repo that You Want to Run the Trigger.
Copy and paste this yaml file example.
This method only trigger the workflow and then finish the pipeline with success report, whether the triggered workflow status is success or fail.
If you want confirmation and wait until the triggered workflow finished, use trigger-and-wait.
Footnote
If there is something you want to ask about this article, please don’t hesitate to raise an issue on this repo or contact me via Telegram.