GitHub Actions
GitHub Actions is a continuous integration and continuous delivery (CI/CD) platform that lets you automate your build, test, and deployment pipeline. PyCharm recognizes GitHub YAML files and provides coding assistance for them. This includes workflow files stored in the .github/workflows directory of your repository and action files stored in the .github/actions directory. For more information, refer to the GitHub Actions documentation.
Enable the GitHub plugin
This functionality relies on the GitHub plugin, which is bundled and enabled in PyCharm by default. If the relevant features are not available, make sure that you did not disable the plugin.
Press Ctrl+Alt+S to open settings and then select
.Open the Installed tab, find the GitHub plugin, and select the checkbox next to the plugin name.
PyCharm supports the following features for working with GitHub files:
PyCharm provides syntax highlighting for the YAML structure of files. You can customize the color scheme in
.You can detect cyclic job dependencies, invalid parameters or standard library function calls, undefined action or file references, undefined job dependencies, and undefined parameters in GitHub files.
You can manage GitHub Actions inspections in the Settings dialog (Ctrl+Alt+S) under .
PyCharm provides extensive completion support to help you write GitHub workflows and actions faster. This includes:
Completion for various GitHub Actions contexts, including
github.*
,env.*
,steps.*
, andinputs.*
. This simplifies the process of scripting complex workflows and reduces the time spent searching for context-specific syntax and parameters.Job dependency completion for
needs
andruns-on
attributes.YAML structure suggestions.
Action parameters, names, and version autocompletion for local actions and actions published in the
actions
organization on GitHub.CRON expression support with validation and completion for scheduled workflows.
Docker image and tag suggestions to integrate Docker containers into your actions.
JavaScript file path completion.
Branding support in action.yml, allowing you to specify icons and colors to visually distinguish your actions in GitHub Marketplace and workflows.
You can quickly navigate between declarations and usages of symbols in GitHub Actions files.
Hover over a symbol or use the Documentation tool window (Ctrl+Q) to view quick documentation.
Create a new GitHub workflow
In the Project tool window, right-click the .github/workflows directory and select New (or press Alt+Insert). Then, select the GitHub Workflow file type.
In the New GitHub Workflow File dialog, specify the file name and press Enter.
Create a new GitHub action
In the Project tool window, right-click the .github/actions directory and select New (or press Alt+Insert). Then, select the GitHub Action file type.
In the New GitHub Action File dialog, specify the file name and press Enter.