Xilai Zhang 6e39eb75a1
[github actions] Fix token issue on actions/checkout package (#141652)
revision 01/17: instead of removing actions/checkout, keep actions/checkout but remove the `token` field and add `persist-credentials` field. tested with a [mirror script](https://github.com/XilaiZhang/miscellaneous-side-project/blob/master/.github/workflows/easy-cp.yml) and creates [expected pull request](https://github.com/flutter/flutter/pull/141730)

Issue: when running github actions, the [tokens not found error](https://github.com/actions/checkout/issues/298) still happens( `Input required and not supplied: token`). We are not using fork PR or dependabot, and it's flaky when the well defined token isn't find in the inputs. We hit this error when invoking [market place actions/checkout](https://github.com/actions/checkout): [example failed run 1](https://github.com/flutter/flutter/actions/runs/7546108771/job/20543199801), [example failed run 2](https://github.com/flutter/flutter/actions/runs/7546141972/job/20543265842)

In this PR, Remove the dependency on marketplace actions  to make our workflow more reliable and less flaky.

other changes to remove actions/checkout dependency:
1. embedded token url for git push
Tried a number of ways and this is the only / best workaround I found to resolve [the notorious problem of pushing without ssh key](https://stackoverflow.com/questions/22147574/github-fatal-could-not-read-username-for-https-github-com-no-such-file-o). 
2. added back `--head`
`--head` is now needed to avoid [abort](https://github.com/XilaiZhang/miscellaneous-side-project/actions/runs/7548409479/job/20550397014)

Test: a [replicate of the actions file](https://github.com/XilaiZhang/miscellaneous-side-project/blob/master/.github/workflows/easy-cp.yml) is [tested](https://github.com/XilaiZhang/miscellaneous-side-project/actions/runs/7548448024/job/20550521341) on my personal repo, and it creates the [expected PR](https://github.com/flutter/flutter/pull/141647)
2024-01-18 18:48:00 +00:00
..
2024-01-16 21:40:08 +00:00