Open GuidoMaggio opened 2 years ago
In case of failure of the scheduled action that updates the data it may be useful to have a manual trigger.
Translated notes from Riccardo
https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#repository_dispatch as additional on: trigger
on: repository_dispatch: # trigger from R via: # gh::gh("POST /repos/:owner/:repo/dispatches", owner = "miraisolutions", repo = "covid19-vaccination-ch", event_type = "on-demand-build-data") types: [on-demand-build-data]
and adding the corresponding if condition
if: github.event_name == 'schedule' || github.event.event_type == 'on-demand-build-data'
The trigger could be done also locally from RStudio
gh::gh("POST /repos/:owner/:repo/dispatches", owner = "miraisolutions", repo = "covid19-vaccination-ch", event_type = "on-demand-build-data")
Assuming there is an environmental variable GITHUB_PAT , or passing the token as argument
.token (?gh::gh)
Not required anymore
In case of failure of the scheduled action that updates the data it may be useful to have a manual trigger.
Translated notes from Riccardo
https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#repository_dispatch as additional on: trigger
and adding the corresponding if condition
The trigger could be done also locally from RStudio
Assuming there is an environmental variable GITHUB_PAT , or passing the token as argument