ultralytics 8.0.90 actions and docs improvements (#2326)
Co-authored-by: calmisential <xinyu_std@163.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: triple Mu <gpu@163.com> Co-authored-by: Laughing <61612323+Laughing-q@users.noreply.github.com> Co-authored-by: Ayush Chaurasia <ayush.chaurarsia@gmail.com> Co-authored-by: Laughing-q <1185102784@qq.com> Co-authored-by: ran xiao <ben.xiao@me.com> Co-authored-by: rxiao <ran.xiao@silverpond.com.au>
This commit is contained in:
parent
243fc4b1fe
commit
44c7c3514d
39 changed files with 783 additions and 143 deletions
2
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
2
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
|
|
@ -80,6 +80,6 @@ body:
|
|||
label: Are you willing to submit a PR?
|
||||
description: >
|
||||
(Optional) We encourage you to submit a [Pull Request](https://github.com/ultralytics/ultralytics/pulls) (PR) to help improve YOLOv8 for everyone, especially if you have a good understanding of how to implement a fix or feature.
|
||||
See the YOLOv8 [Contributing Guide](https://github.com/ultralytics/ultralytics/blob/main/CONTRIBUTING.md) to get started.
|
||||
See the YOLOv8 [Contributing Guide](https://docs.ultralytics.com/help/contributing) to get started.
|
||||
options:
|
||||
- label: Yes I'd like to help by submitting a PR!
|
||||
|
|
|
|||
2
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
2
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
|
|
@ -45,6 +45,6 @@ body:
|
|||
label: Are you willing to submit a PR?
|
||||
description: >
|
||||
(Optional) We encourage you to submit a [Pull Request](https://github.com/ultralytics/ultralytics/pulls) (PR) to help improve YOLOv8 for everyone, especially if you have a good understanding of how to implement a fix or feature.
|
||||
See the YOLOv8 [Contributing Guide](https://github.com/ultralytics/ultralytics/blob/main/CONTRIBUTING.md) to get started.
|
||||
See the YOLOv8 [Contributing Guide](https://docs.ultralytics.com/help/contributing) to get started.
|
||||
options:
|
||||
- label: Yes I'd like to help by submitting a PR!
|
||||
|
|
|
|||
2
.github/workflows/cla.yml
vendored
2
.github/workflows/cla.yml
vendored
|
|
@ -25,7 +25,7 @@ jobs:
|
|||
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
||||
with:
|
||||
path-to-signatures: 'signatures/version1/cla.json'
|
||||
path-to-document: 'https://github.com/ultralytics/assets/blob/main/documents/CLA.md' # CLA document
|
||||
path-to-document: 'https://docs.ultralytics.com/help/CLA' # CLA document
|
||||
# branch should not be protected
|
||||
branch: 'main'
|
||||
allowlist: dependabot[bot],github-actions,[pre-commit*,pre-commit*,bot*
|
||||
|
|
|
|||
2
.github/workflows/greetings.yml
vendored
2
.github/workflows/greetings.yml
vendored
|
|
@ -23,7 +23,7 @@ jobs:
|
|||
- ✅ Update YOLOv8 [Docs](https://docs.ultralytics.com) for any new or updated features.
|
||||
- ✅ Reduce changes to the absolute **minimum** required for your bug fix or feature addition. _"It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is."_ — Bruce Lee
|
||||
|
||||
See our [Contributing Guide](https://github.com/ultralytics/ultralytics/blob/main/CONTRIBUTING.md) for details and let us know if you have any questions!
|
||||
See our [Contributing Guide](https://docs.ultralytics.com/help/contributing) for details and let us know if you have any questions!
|
||||
|
||||
issue-message: |
|
||||
👋 Hello @${{ github.actor }}, thank you for your interest in YOLOv8 🚀! We recommend a visit to the [YOLOv8 Docs](https://docs.ultralytics.com) for new users where you can find many [Python](https://docs.ultralytics.com/usage/python/) and [CLI](https://docs.ultralytics.com/usage/cli/) usage examples and where many of the most common questions may already be answered.
|
||||
|
|
|
|||
45
.github/workflows/publish.yml
vendored
45
.github/workflows/publish.yml
vendored
|
|
@ -47,6 +47,7 @@ jobs:
|
|||
d = [a - b for a, b in zip(v_local, v_pypi)] # diff
|
||||
increment = (d[0] == d[1] == 0) and d[2] == 1 # only publish if patch version increments by 1
|
||||
os.system(f'echo "increment={increment}" >> $GITHUB_OUTPUT')
|
||||
os.system(f'echo "version={ultralytics.__version__}" >> $GITHUB_OUTPUT')
|
||||
if increment:
|
||||
print('Local version is higher than PyPI version. Publishing new version to PyPI ✅.')
|
||||
id: check_pypi
|
||||
|
|
@ -64,6 +65,44 @@ jobs:
|
|||
env:
|
||||
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
||||
run: |
|
||||
mkdocs gh-deploy --force || true
|
||||
# git checkout gh-pages
|
||||
# git push https://$PERSONAL_ACCESS_TOKEN@github.com/ultralytics/docs gh-pages --force
|
||||
mkdocs build
|
||||
git config --global user.name "Glenn Jocher"
|
||||
git config --global user.email "glenn.jocher@ultralytics.com"
|
||||
git clone https://github.com/ultralytics/docs.git docs-repo
|
||||
cd docs-repo
|
||||
git checkout gh-pages || git checkout -b gh-pages
|
||||
rm -rf *
|
||||
cp -R ../site/* .
|
||||
git add .
|
||||
git commit -m "Update Docs for 'ultralytics ${{ steps.check_pypi.outputs.version }}'"
|
||||
git push https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/ultralytics/docs.git gh-pages
|
||||
- name: Extract PR Details
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" = "pull_request" ]; then
|
||||
PR_JSON=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }})
|
||||
PR_NUMBER=${{ github.event.pull_request.number }}
|
||||
PR_TITLE=$(echo $PR_JSON | jq -r '.title')
|
||||
else
|
||||
COMMIT_SHA=${{ github.event.after }}
|
||||
PR_JSON=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/search/issues?q=repo:${{ github.repository }}+is:pr+is:merged+sha:$COMMIT_SHA")
|
||||
PR_NUMBER=$(echo $PR_JSON | jq -r '.items[0].number')
|
||||
PR_TITLE=$(echo $PR_JSON | jq -r '.items[0].title')
|
||||
fi
|
||||
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
|
||||
echo "PR_TITLE=$PR_TITLE" >> $GITHUB_ENV
|
||||
- name: Notify on Slack (Success)
|
||||
if: success() && github.event_name == 'push' && steps.check_pypi.outputs.increment == 'True'
|
||||
uses: slackapi/slack-github-action@v1.23.0
|
||||
with:
|
||||
payload: |
|
||||
{"text": "<!channel> GitHub Actions success for ${{ github.workflow }} ✅\n\n\n*Repository:* https://github.com/${{ github.repository }}\n*Action:* https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Author:* ${{ github.actor }}\n*Event:* NEW 'ultralytics ${{ steps.check_pypi.outputs.version }}' pip package published 😃\n*Job Status:* ${{ job.status }}\n*Pull Request:* <https://github.com/${{ github.repository }}/pull/${{ env.PR_NUMBER }}> ${{ env.PR_TITLE }}\n"}
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_YOLO }}
|
||||
- name: Notify on Slack (Failure)
|
||||
if: failure()
|
||||
uses: slackapi/slack-github-action@v1.23.0
|
||||
with:
|
||||
payload: |
|
||||
{"text": "<!channel> GitHub Actions error for ${{ github.workflow }} ❌\n\n\n*Repository:* https://github.com/${{ github.repository }}\n*Action:* https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Author:* ${{ github.actor }}\n*Event:* ${{ github.event_name }}\n*Job Status:* ${{ job.status }}\n*Pull Request:* <https://github.com/${{ github.repository }}/pull/${{ env.PR_NUMBER }}> ${{ env.PR_TITLE }}\n"}
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_YOLO }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue