Skip to content

chore(ci): add a workflow to auto-commit docs changes - #59

Draft
ctreatma wants to merge 5 commits into
mainfrom
auto-update-docs
Draft

ctreatma wants to merge 5 commits into
mainfrom
auto-update-docs

Conversation

@ctreatma

@ctreatma ctreatma commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@ctreatma
ctreatma force-pushed the auto-update-docs branch 7 times, most recently from a043f1e to d05601f Compare August 5, 2026 19:51
- name: Determine if PR is from Renovate
id: author_check
run: |
is_renovate=${{github.actor == 'ctreatma' && startsWith(github.head_ref, 'auto')}}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is ctreatma used in renovate?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fwiw - the repo org is equinix

@ctreatma
ctreatma marked this pull request as draft August 20, 2026 14:26
@displague

Copy link
Copy Markdown
Member

From what I see, the flow where this triggers would be:

  • Renovate (not dependabot) PR opens with latest equinix-sdk
  • this GH action fires to rebuild docs
  • CI golang linter passes
  • CI docs check passes
  • merge
  • release
  • GH action fires to release

@displague displague left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. Renovate detection is still the test stub. github.actor == 'ctreatma' && startsWith(github.head_ref, 'auto') should become something like github.event.pull_request.user.login == 'renovate[bot]' (optionally plus startsWith(github.head_ref, 'renovate/')). github.actor is whoever triggered the run, so it changes when someone else rebases or re-runs the PR.

  2. The pushed docs commit won't get any checks. A push made with the default GITHUB_TOKEN doesn't start new workflow runs, so the new head commit has no Validate CLI Docs / lint results. Meanwhile the original commit keeps a failed Validate CLI Docs, because make docs-check fails 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.
  3. 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.json needs the workflow's commit email in gitIgnoredAuthors:

    "gitIgnoredAuthors": ["bot@equinix.noreply.github.com"]

    That could go in this PR.

  4. Cleanup:

    • Drop the TEMP commits, the debug step, and the SDK bump and generated docs that were only there to trigger the workflow.
    • Rebase on main. The actions/checkout and actions/setup-go pins here are older than main (checkout v6.1.0, setup-go v7.0.0), so this will conflict.
    • The validate_pr_title.yaml change (removing synchronize) 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.

Once 1–3 are in, the flow described above (Renovate PR → docs rebuilt → lint/docs checks pass → merge → release) should work end to end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants