You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When GitHub Actions deploys to GitHub Pages, it uses conditional logic to decide which commit message to use. According to the config file, it looks like the commit message should be determined by the event that triggered the build:
echo "::set-output name=commit_message::Deploy via merge"
fi
However in practice, the commit message is always"Hourly scheduled redeploy".
It looks like ${{ github.event.number }} always evaluates to an empty string. This seems consistent with the GitHub docs for builds triggered by a 'push' event, which suggests that number isn't a property of 'push' events.
Instead, I think we could probably change the if statement to something like this:
- if [ "${{ github.event.number }}" == "" ]; then+ if [ "${{ github.event_name }}" == "schedule" ]; then
It assumes that cron-triggered builds have an event_name of "schedule" – which I think is correct, but this assumption would need to be tested.
The text was updated successfully, but these errors were encountered:
When GitHub Actions deploys to GitHub Pages, it uses conditional logic to decide which commit message to use. According to the config file, it looks like the commit message should be determined by the event that triggered the build:
govuk-developer-docs/.github/workflows/ci.yml
Lines 31 to 38 in b0c0a6d
However in practice, the commit message is always
"Hourly scheduled redeploy"
.It looks like
${{ github.event.number }}
always evaluates to an empty string. This seems consistent with the GitHub docs for builds triggered by a 'push' event, which suggests thatnumber
isn't a property of 'push' events.Instead, I think we could probably change the
if
statement to something like this:It assumes that cron-triggered builds have an
event_name
of"schedule"
– which I think is correct, but this assumption would need to be tested.The text was updated successfully, but these errors were encountered: