Skip to content
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

Update Ultralytics Actions with Lychee and GitHub Token #47

Merged
merged 3 commits into from
Jan 8, 2024

Conversation

pderrenger
Copy link
Member

@pderrenger pderrenger commented Jan 8, 2024

This pull request adds an improved Ultralytics Actions workflow to automatically format code and documentation to the new Ultralytics official standards maintained at https://github.com/ultralytics/actions.

Five individual actions are run by default now including a new broken links check for markdown and HTML files. Disable individual actions by setting them to false or removing their line, i.e. delete 'markdown: true' line to disable markdown formatting.

Note that additional spellings have been added to the Ultralytics spelling dictionary and frontmatter is now ignored by markdown formatters per your feedback.

To customize an action use a pyproject.toml file in this repo. For details see https://github.com/ultralytics/actions.

# Ultralytics 🚀 - AGPL-3.0 license
# Ultralytics Actions https://github.com/ultralytics/actions
# This workflow automatically formats code and documentation in PRs to official Ultralytics standards

name: Ultralytics Actions

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  format:
    runs-on: ubuntu-latest
    steps:
      - name: Run Ultralytics Formatting
        uses: ultralytics/actions@main
        with:
          token: ${{ secrets.GITHUB_TOKEN }}  # automatically generated
          python: true
          docstrings: true
          markdown: true
          spelling: true
          links: true

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Updating GitHub Actions workflow for PR event handling.

📊 Key Changes

  • Changed the event trigger from pull_request_target to pull_request.

🎯 Purpose & Impact

  • The purpose is to refine the automation of code formatting checks.
  • This impacts how GitHub Actions runs when new pull requests are made, potentially enhancing security by running workflows in the context of the pull request rather than the base repository. 🛡️
  • Users can expect more secure and appropriate CI/CD behavior when contributing code to the repository. 👩‍💻🔒

@glenn-jocher glenn-jocher merged commit af0584d into main Jan 8, 2024
2 checks passed
@glenn-jocher glenn-jocher deleted the update-format-workflow-20240108181615 branch January 8, 2024 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants