-
Notifications
You must be signed in to change notification settings - Fork 688
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into update_3rd_party_…
…sw_version
- Loading branch information
Showing
405 changed files
with
18,708 additions
and
5,186 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Links (Fail Fast) | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
linkChecker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: 'Get a list of changed markdown files to process' | ||
id: changed-files | ||
run: | | ||
CHANGED_FILES=$(git diff-tree --name-only --diff-filter 'AM' -r HEAD^1 HEAD -- "*.md" | sed -z "s/\n$//;s/\n/' '/g") | ||
echo "::set-output name=all_changed_files::${CHANGED_FILES}" | ||
- name: Download Exclude Path | ||
run: | | ||
curl https://raw.githubusercontent.com/pingcap/docs/master/.lycheeignore -O | ||
- name: Link Checker | ||
if: ${{ steps.changed-files.outputs.all_changed_files }} | ||
uses: lycheeverse/lychee-action@v1.5.0 | ||
with: | ||
fail: true | ||
args: -E --exclude-mail -i -n -t 45 -- '${{ steps.changed-files.outputs.all_changed_files }}' | ||
env: | ||
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
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,46 @@ | ||
name: Prevent Deletion | ||
|
||
on: | ||
pull_request_target: | ||
types: [opened, reopened, synchronize] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
check: | ||
permissions: | ||
checks: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout base | ||
uses: actions/checkout@v3 | ||
- name: Fetch head | ||
run: | | ||
git remote add head ${{ github.event.pull_request.head.repo.clone_url }} | ||
git fetch --depth=1 head ${{ github.event.pull_request.head.ref }} | ||
- name: Find changes | ||
run: | | ||
git rev-parse '${{ github.event.pull_request.head.sha }}' | ||
if git diff --name-only --diff-filter 'D' HEAD '${{ github.event.pull_request.head.sha }}' | grep -E '^media/.*\.(jpg|png|jpeg|gif)$' >/tmp/changed_files; then | ||
cat /tmp/changed_files | ||
echo '{"name":"Image Deletion Check","head_sha":"${{ github.event.pull_request.head.sha }}","status":"completed","conclusion":"failure"}' > /tmp/body.json | ||
jq \ | ||
--arg count "$(wc -l /tmp/changed_files | awk '{print $1}')" \ | ||
--arg summary "$(cat /tmp/changed_files | sed 's/^/- /')" \ | ||
'.output.title = "Found " + $count + " deleted images" | .output.summary = $summary' \ | ||
/tmp/body.json > /tmp/body2.json | ||
else | ||
echo '{"name":"Image Deletion Check","head_sha":"${{ github.event.pull_request.head.sha }}","status":"completed","conclusion":"success","output":{"title":"OK","summary":"No deleted images"}}' > /tmp/body2.json | ||
fi | ||
- name: Publish result | ||
run: | | ||
cat /tmp/body2.json | ||
curl \ | ||
-sSL \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: token ${{ github.token }}" \ | ||
-T '/tmp/body2.json' \ | ||
'https://api.github.com/repos/${{ github.repository }}/check-runs' |
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
Oops, something went wrong.