forked from kubernetes/website
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow to automatically update
schedule.yaml
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
- Loading branch information
1 parent
7b6def7
commit 012d33d
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Update schedule.yaml | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- update-schedule-yaml | ||
# schedule: | ||
# - cron: '0 10 * * *' | ||
jobs: | ||
create-pull-request: | ||
name: Create PR (if required) | ||
# if: github.repository == 'kubernetes-sigs/downloadkubernetes' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.22' | ||
check-latest: true | ||
|
||
- name: Install schedule-builder | ||
run: go install k8s.io/release/cmd/schedule-builder@latest | ||
|
||
- name: Update schedule.yaml | ||
run: | | ||
echo ${{github.repository}} | ||
schedule-builder -u -c data/releases/schedule.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@v6 | ||
if: ${{ steps.create_pr.outputs.create_pr == 'true' }} | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
commit-message: Update schedule.yaml | ||
title: Update schedule.yaml | ||
body: Update schedule.yaml | ||
labels: ok-to-test | ||
branch: update-schedule | ||
delete-branch: true | ||
signoff: true |