forked from kubernetes-sigs/kubebuilder
-
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.
changes to not run tests when the changes are only in docs or comments
- Loading branch information
1 parent
92e29e8
commit 359097d
Showing
6 changed files
with
143 additions
and
19 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
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
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
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
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 |
---|---|---|
|
@@ -4,15 +4,31 @@ on: | |
pull_request_target: | ||
types: [opened, edited, reopened] | ||
|
||
|
||
jobs: | ||
check_docs_only: | ||
name: check_docs_only | ||
runs-on: ubuntu-18.04 | ||
outputs: | ||
skip: ${{ steps.check_docs_only.outputs.skip }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- id: check_docs_only | ||
# Since PR's are squashed prior to merging to the branch checked out (default branch), | ||
# HEAD^ will resolve to the previous point in history. | ||
run: | | ||
REF="HEAD^" | ||
[[ -z "${{ github.base_ref }}" ]] || REF=$(git show-ref ${{ github.base_ref }} | head -1 | cut -d' ' -f2) | ||
echo "::set-output name=skip::$(test/check-docs-only.sh $REF)" | ||
verify: | ||
name: Verify PR contents | ||
runs-on: ubuntu-latest | ||
if: needs.check_docs_only.outputs.skip != 'true' | ||
This comment has been minimized.
Sorry, something went wrong.
camilamacedo86
|
||
steps: | ||
- name: Verifier action | ||
id: verifier | ||
uses: kubernetes-sigs/kubebuilder-release-tools@v0.1.1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Verifier action | ||
id: verifier | ||
uses: kubernetes-sigs/kubebuilder-release-tools@v0.1.1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
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,44 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright 2018 The Kubernetes Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# This script runs goreleaser using the build/.goreleaser.yml config. | ||
# While it can be run locally, it is intended to be run by cloudbuild | ||
# in the goreleaser/goreleaser image. | ||
|
||
set -e | ||
|
||
# If running in Github actions: this should be set to "github.base_ref". | ||
: ${1?"the first argument must be set to a commit-ish reference"} | ||
|
||
# Patterns to ignore. | ||
declare -a DOC_PATTERNS | ||
DOC_PATTERNS=( | ||
"(\.md)" | ||
"(\.MD)" | ||
"(\.png)" | ||
"(\.pdf)" | ||
"(netlify\.toml)" | ||
"(website/)" | ||
"(changelog/)" | ||
"(OWNERS)" | ||
"(OWNERS_ALIASES)" | ||
"(LICENSE)" | ||
) | ||
|
||
if ! git diff --name-only $1 | grep -qvE "$(IFS="|"; echo "${DOC_PATTERNS[*]}")"; then | ||
echo "true" | ||
exit 0 | ||
fi |
For this one, I think we need to leave testing. WHY
We might will add the README kubernetes-sigs#2610.
Also, we have the license files which are scaffolded by default
So that, we cannot skip them.