-
Notifications
You must be signed in to change notification settings - Fork 509
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport main workflows to 2.11 branch (#6905)
* Backport main workflows to 2.11 branch Signed-off-by: Peter Zhu <[email protected]> * Backport main workflows to 2.11 branch Signed-off-by: Peter Zhu <[email protected]> --------- Signed-off-by: Peter Zhu <[email protected]>
- Loading branch information
1 parent
8cb76c8
commit 8428da2
Showing
9 changed files
with
111 additions
and
21 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,33 @@ | ||
name: Automerge Backport | ||
on: | ||
pull_request: | ||
pull_request_review: | ||
types: | ||
- submitted | ||
check_suite: | ||
types: | ||
- completed | ||
status: {} | ||
jobs: | ||
automerge-backport: | ||
if: | | ||
github.repository == 'opensearch-project/documentation-website' && | ||
startsWith(github.event.pull_request.head.ref, 'backport/') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Wait some time so that label and approval is up | ||
run: sleep 30 | ||
- id: automerge | ||
name: automerge | ||
uses: "pascalgn/[email protected]" | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
MERGE_LABELS: "backport-automerge,!On hold" | ||
MERGE_FILTER_AUTHOR: "opensearch-trigger-bot[bot]" | ||
MERGE_REQUIRED_APPROVALS: "1" | ||
MERGE_RETRIES: "20" | ||
MERGE_RETRY_SLEEP: "10000" | ||
MERGE_ERROR_FAIL: "true" | ||
MERGE_FORKS: "false" | ||
MERGE_METHOD: "squash" | ||
MERGE_DELETE_BRANCH: "true" |
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 was deleted.
Oops, something went wrong.
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,22 @@ | ||
name: Delete merged branch of the PRs | ||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
|
||
jobs: | ||
delete-branch: | ||
runs-on: ubuntu-latest | ||
if: | | ||
github.repository == 'opensearch-project/documentation-website' && | ||
${{ !startsWith(github.event.pull_request.head.ref, 'main') }} && | ||
${{ !startsWith(github.event.pull_request.head.ref, '1.') }} && | ||
${{ !startsWith(github.event.pull_request.head.ref, '2.') }} && | ||
${{ !startsWith(github.event.pull_request.head.ref, 'version/') }} | ||
steps: | ||
- name: Echo remove branch | ||
run: echo Removing ${{github.event.pull_request.head.ref}} | ||
- name: Delete merged branch | ||
uses: SvanBoxel/delete-merged-branch@main | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Encoding Checker | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
encoding-checker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Check for possible file that does not follow utf-8 encoding | ||
run: | | ||
set +e | ||
IFS=$(echo -en "\n\b") | ||
COUNTER=0 | ||
for i in `find . -type f \( -name "*.txt" -o -name "*.md" -o -name "*.markdown" -o -name "*.html" \) | grep -vE "^./.git"`; | ||
do | ||
grep -axv '.*' "$i" | ||
if [ "$?" -eq 0 ]; then | ||
echo -e "######################\n$i\n######################" | ||
COUNTER=$(( COUNTER + 1 )) | ||
fi | ||
done | ||
if [ "$COUNTER" != 0 ]; then | ||
echo "Found files that is not following utf-8 encoding, exit 1" | ||
exit 1 | ||
fi |
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