Skip to content

fix(container): update image coredns ( 1.46.0 → 1.46.2 ) #220

fix(container): update image coredns ( 1.46.0 → 1.46.2 )

fix(container): update image coredns ( 1.46.0 → 1.46.2 ) #220

---
name: "k8s - Reference Docs Update"
on:
pull_request:
branches: ["main"]
paths:
- "kubernetes/core/**"
schedule:
- cron: "0 6 * * 1"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -euxo pipefail {0}
permissions:
contents: write
pull-requests: write
models: read
jobs:
update-reference-docs:
name: Update reference docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
# Checkout the PR branch so we can commit back to it
ref: ${{ github.event.pull_request.head.ref || github.ref }}
fetch-depth: 0
- uses: actions/setup-python@v6
with:
python-version: "3.14"
cache: pip
- name: Install dependencies
run: pip install openai
- name: Run reference updater
id: updater
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# In PR context, pass the list of changed files so the script
# only processes affected components
CHANGED_FILES: ${{ toJson(github.event.pull_request.changed_files) }}
PR_NUMBER: ${{ github.event.pull_request.number }}
EVENT_NAME: ${{ github.event_name }}
run: python .github/scripts/update-reference-docs.py
- name: Post analysis comment
if: github.event_name == 'pull_request' && steps.updater.outputs.comment != ''
uses: mshick/add-pr-comment@v3
with:
message-id: "reference-docs-analysis"
message: ${{ steps.updater.outputs.comment }}
- name: Commit updated reference.md files
if: github.event_name == 'pull_request'
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git diff --quiet && exit 0
git add -u
git commit -m "docs(k8s): update reference docs for changed components"
git push
- name: Submit PR review
if: github.event_name == 'pull_request' && steps.updater.outputs.review_event != ''
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr review ${{ github.event.pull_request.number }} \
--${{ steps.updater.outputs.review_event }} \
--body "${{ steps.updater.outputs.review_body }}"
- name: Check for changes
if: github.event_name != 'pull_request'
id: changes
run: |
git diff --quiet && echo "changed=false" >> "$GITHUB_OUTPUT" || echo "changed=true" >> "$GITHUB_OUTPUT"
- name: Open PR
if: github.event_name != 'pull_request' && steps.changes.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: docs/reference-update-${{ github.run_id }}
delete-branch: true
title: "docs(k8s): update component reference docs"
body: |
Automated weekly reference doc refresh.
Updated by `update-reference-docs.py` using GitHub Models (`gpt-4o-mini`).
Trigger: `${{ github.event_name }}` / run `${{ github.run_id }}`
commit-message: "docs(k8s): update component reference docs"
labels: documentation