Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow to automatically update schedule.yaml #45762

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/update-schedule.yml
Copy link
Contributor

Choose a reason for hiding this comment

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

Any CLA issues expected with this workflow?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, we're using the same approach there for example: kubernetes-sigs/downloadkubernetes#630

Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Update schedule.yaml
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # daily
jobs:
create-pull-request:
name: Create PR (if required)
if: github.repository == 'kubernetes/website'
runs-on: ubuntu-latest
steps:
- name: Check out repository code
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0

- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '1.22'
check-latest: true

- name: Install schedule-builder
run: go install k8s.io/release/cmd/schedule-builder@v0.16.9

- name: Update schedule.yaml
run: schedule-builder -uc data/releases/schedule.yaml -e data/releases/eol.yaml

- name: Check workspace
id: create_pr
run: |
if [[ $(git diff --stat) != '' ]]; then
echo "create_pr=true" >> "$GITHUB_OUTPUT"
fi

- name: Create Pull Request
uses: peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e # v6.0.2
if: ${{ steps.create_pr.outputs.create_pr == 'true' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update schedule.yaml
title: Update release schedule.yaml
body: |
Update release schedule.yaml

/cc @kubernetes/release-managers
labels: area/release-eng, sig/release, sig/docs
branch: update-schedule
delete-branch: true
signoff: true