I want to trigger a compilation result of a releaseConfig dataform when I merge to main branch. I know that I can schedule the compilation but I prefer to trigger the compilation once my branch is merged.
I'm using github git provider.. the call to the api dataform to compile a releaseconfig looks like this:
{
"createCompilationResult": {
"call": "http.post",
"args": {
"url": "${\"https://dataform.googleapis.com/v1beta1/\" + repository + \"/compilationResults\"}",
"auth": {
"type": "OAuth2"
},
"body": {
"releaseConfig": "${repository + \"/releaseConfigs/\" + \"${releaseConfigName}\"}"
}
},
"result": "compilationResult"
}
}
Any ideas please ?
Thank you
To trigger a compilation result of releaseConfig dataform when you merge to the main branch using the GitHub Actions. Utilizing the GitHub actions, you can automate the process as follows:
Create a new workflow YAML file (.yml) under the .github/workflows directory in your repository. This file will define the workflow steps for triggering the compilation.
Add the following content to the file:
Replace <your_token>, <your_release_config_path>, and <your_repository> with the actual values. This workflow will trigger the compilation when a pull request is closed, which corresponds to merging the pull request into the main branch.