-
Notifications
You must be signed in to change notification settings - Fork 397
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 krel release notes validation workflow #2698
base: master
Are you sure you want to change the base?
Add krel release notes validation workflow #2698
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: npolshakova The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/assign |
Signed-off-by: Vyom-Yadav <jackhammervyom@gmail.com>
Signed-off-by: Vyom-Yadav <jackhammervyom@gmail.com>
c469b5e
to
cc3bf07
Compare
- name: Get the latest commit from the base branch | ||
id: base_branch_commit | ||
run: | | ||
echo "commit=$(git rev-parse origin/master)" >> $GITHUB_OUTPUT | ||
- name: Get all changed release files | ||
id: changed-files | ||
uses: tj-actions/changed-files@cc733854b1f224978ef800d29e4709d5ee2883e4 # v44.5.5 | ||
with: | ||
base_sha: ${{ steps.base_branch_commit.outputs.commit }} | ||
files: releases/**/*.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@npolshakova I removed this section. changed-files
are being calculated in the next step (using bash and git) and this wasn't being used anywhere.
- name: Cancel Previous Actions | ||
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 | ||
with: | ||
access_token: ${{ github.token }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're using:
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
So, I don't think this is required.
echo "invalid_files=$INVALID_FILES" >> $GITHUB_ENV | ||
echo "::set-output name=invalid_files::$(echo -n "$INVALID_FILES")" | ||
echo "invalid_files=$(echo -n "$INVALID_FILES")" >> "$GITHUB_OUTPUT" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any reason to add it to GITHUB_ENV
.
|
||
KREL_VERSION=v0.17.12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've pinned this to v0.17.12
, if and when we do a new release of krel
, we'd need to update this. (I think there may be some automated job to do that, or we can add this to the handbook (for the lead to update it).
Alternatively, do we want to fetch the latest release?
What type of PR is this:
/kind feature
What this PR does / why we need it:
Adds a GitHub Action to setup krel.
This is required to setup a presubmit job for PRs like: #2659. The current requirement is to add validation using:
$ krel release-notes validate --help
krel release-notes validate
The 'validate' subcommand of krel has been developed to:
Check release notes maps for valid yaml.
Check release notes maps for valid punctuation.
The release notes team is blocked whenever invalid yaml is merged into sig-release:
#2589
#2541
Invalid yaml can be introduced during the review process when people apply changes or manually edit the maps (not through krel, but in an editor). This workflow automates preventing invalid yaml from merging into sig-release.
Which issue(s) this PR fixes:
Fixes kubernetes/release#2753
Special notes for your reviewer:
Based on @Vyom-Yadav's GitHub workflow: kubernetes-sigs/release-actions#101