When the GitHub workflow commits formatting changes, it doesn't retrigger the CLA.
To make this work we need to use the personal access token.
Similar to how we do it on gix-components.
Changes
Check if the access token is available
If so, use it for checkout out the code, and later commit changes.
If not, just fail if changes were required.
Remove the ref: ${{ github.event.pull_request.head.ref }} parameter in case of pull requests. It's needed for the newer version of EndBug but would result in having to have 4 different conditional checkout steps.
Motivation
When the GitHub workflow commits formatting changes, it doesn't retrigger the CLA. To make this work we need to use the personal access token. Similar to how we do it on gix-components.
Changes
ref: ${{ github.event.pull_request.head.ref }}
parameter in case of pull requests. It's needed for the newer version of EndBug but would result in having to have 4 different conditional checkout steps.Note that I had to use the same older version of
EndBug/add-and-commit@v7.2.0
that gix-components uses because withEndBug/add-and-commit@v9.1.1
I get: https://github.com/dfinity/snsdemo/actions/runs/9594195671/job/26456241660