Repository navigation
Conversation
a043f1e to
d05601f
Compare
c693248 to
79b2be2
Compare
| - name: Determine if PR is from Renovate | ||
| id: author_check | ||
| run: | | ||
| is_renovate=${{github.actor == 'ctreatma' && startsWith(github.head_ref, 'auto')}} |
There was a problem hiding this comment.
Is ctreatma used in renovate?
There was a problem hiding this comment.
That's from e35bd38, to enable testing of the check logic before merge.
| steps.author_check.outputs.is_renovate == 'true' && | ||
| steps.validate_docs.outcome == 'failure' | ||
| run: | | ||
| git config --global user.name 'equinix-labs@auto-commit-workflow' |
There was a problem hiding this comment.
fwiw - the repo org is equinix
|
From what I see, the flow where this triggers would be:
|
displague
left a comment
There was a problem hiding this comment.
This is the right approach. #49 showed that postUpgradeTasks isn't an option on the hosted Mend Renovate app (Post-upgrade command 'make docs' has not been added to the allowed list in allowedCommands). A few things to address before this can merge:
-
Renovate detection is still the test stub.
github.actor == 'ctreatma' && startsWith(github.head_ref, 'auto')should become something likegithub.event.pull_request.user.login == 'renovate[bot]'(optionally plusstartsWith(github.head_ref, 'renovate/')).github.actoris whoever triggered the run, so it changes when someone else rebases or re-runs the PR. -
The pushed docs commit won't get any checks. A push made with the default
GITHUB_TOKENdoesn't start new workflow runs, so the new head commit has noValidate CLI Docs/ lint results. Meanwhile the original commit keeps a failedValidate CLI Docs, becausemake docs-checkfails before the push step runs. If the check is required, the PR stays blocked. Options:- push with a GitHub App token (e.g.
actions/create-github-app-token) or a PAT, so checks run on the new commit, or - on Renovate PRs, make the job succeed once the push succeeds, accepting that the new commit isn't re-validated.
- push with a GitHub App token (e.g.
-
Renovate will stop rebasing the branch once the workflow commits to it, the same way it did on #49 ("does not recognize the last commit author and assumes somebody else may have edited the PR").
renovate.jsonneeds the workflow's commit email ingitIgnoredAuthors:"gitIgnoredAuthors": ["bot@equinix.noreply.github.com"]
That could go in this PR.
-
Cleanup:
- Drop the
TEMPcommits, the debug step, and the SDK bump and generated docs that were only there to trigger the workflow. - Rebase on
main. Theactions/checkoutandactions/setup-gopins here are older thanmain(checkoutv6.1.0,setup-gov7.0.0), so this will conflict. - The
validate_pr_title.yamlchange (removingsynchronize) isn't explained. If it's to avoid re-running on the bot push, a note in the description would help. Otherwise it's probably unrelated to this PR.
- Drop the
Once 1–3 are in, the flow described above (Renovate PR → docs rebuilt → lint/docs checks pass → merge → release) should work end to end.
No description provided.