Skip to content

Commit 5fcc6d8

Browse files
authored
Merge pull request #45762 from saschagrunert/update-schedule-yaml
Add workflow to automatically update schedule.yaml
2 parents 29957e8 + a63678a commit 5fcc6d8

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/update-schedule.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Update schedule.yaml
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '0 0 * * *' # daily
6+
jobs:
7+
create-pull-request:
8+
name: Create PR (if required)
9+
if: github.repository == 'kubernetes/website'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check out repository code
13+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
14+
with:
15+
fetch-depth: 0
16+
17+
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
18+
with:
19+
go-version: '1.22'
20+
check-latest: true
21+
22+
- name: Install schedule-builder
23+
run: go install k8s.io/release/cmd/[email protected]
24+
25+
- name: Update schedule.yaml
26+
run: schedule-builder -uc data/releases/schedule.yaml -e data/releases/eol.yaml
27+
28+
- name: Check workspace
29+
id: create_pr
30+
run: |
31+
if [[ $(git diff --stat) != '' ]]; then
32+
echo "create_pr=true" >> "$GITHUB_OUTPUT"
33+
fi
34+
35+
- name: Create Pull Request
36+
uses: peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e # v6.0.2
37+
if: ${{ steps.create_pr.outputs.create_pr == 'true' }}
38+
with:
39+
token: ${{ secrets.GITHUB_TOKEN }}
40+
commit-message: Update schedule.yaml
41+
title: Update release schedule.yaml
42+
body: |
43+
Update release schedule.yaml
44+
45+
/cc @kubernetes/release-managers
46+
labels: area/release-eng, sig/release, sig/docs
47+
branch: update-schedule
48+
delete-branch: true
49+
signoff: true

0 commit comments

Comments
 (0)