From a59f702e58b7c7b54e326b7cc55770051dc38e65 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Tue, 4 Feb 2025 20:19:08 +0100 Subject: [PATCH] Add documentation for new features in GitHub Actions --- docs/README.md | 1003 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 823 insertions(+), 180 deletions(-) diff --git a/docs/README.md b/docs/README.md index e3a1fc8..450ac55 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,180 +1,823 @@ -# GitHub PowerShell - -The **GitHub PowerShell** module serves as a convenient API wrapper around [GitHub's REST API](https://docs.github.com/en/rest), making the functionalities and data available on GitHub accessible through PowerShell commands. This module is tailored for developers, administrators, and GitHub enthusiasts who are familiar with PowerShell and want to integrate or manage their GitHub repositories seamlessly. - -**GitHub PowerShell** is built with the community in mind and targets individuals who prefer script-based solutions and want to automate various tasks on GitHub without resorting to a full-fledged development approach. - -## Features & Benefits of GitHub PowerShell - -- **Comprehensive Access**: Harness the power of GitHub's REST API from your PowerShell console, providing you with capabilities to manage repositories, issues, pull requests, and more. - -- **Support for PowerShell Versions**: This module is tested and compatible with both PowerShell 7 and Windows PowerShell 5.1 ensuring wide accessibility. - -- **Cross-Platform**: Whether you're on Windows, macOS, or Linux, GitHub PowerShell has you covered. - -- **Modern Authentication**: Integrate seamlessly with GitHub's authentication methods, including personal access tokens and OAuth, for secure script execution. - -- **Active Development and Community Support**: As with the open-source spirit of GitHub, this module invites contributors for constant improvement and evolution. Regular updates ensure that the module remains in sync with any changes to the GitHub REST API. - -- **Intuitive Command Design**: Commands are structured logically, ensuring that even new users can get started quickly without a steep learning curve. - -## Getting Started with GitHub PowerShell - -To dive into the world of GitHub automation with PowerShell, follow the sections below. - -### Installing the module - -Download and install the GitHub PowerShell module from the PowerShell Gallery with the following command: - -```powershell -Install-Module -Name GitHub -Force -AllowClobber -``` - -### Logging on - -Authenticate using your GitHub credentials or access tokens to begin executing commands. Tokens and other -configuration details are stored encrypted on the system using the PowerShell modules [SecretManagement and SecretStore Overview](https://learn.microsoft.com/en-us/powershell/utility-modules/secretmanagement/overview?view=ps-modules), -for more info on the implementation, see the section on storing configuration. - -#### Device flow - -This is the recommended method for authentication due to access tokens being short lived. -It opens a browser window and prompts you to log in to GitHub. Once you log in, you will be provided with -a code that you need to paste into the PowerShell console. The command already puts the code in your clipboard. -It uses a GitHub App to authenticate, which is more secure than using a personal access token. The GitHub App -is only granted access to the repositories you add it to. Visit the [GitHub Apps documentation](https://docs.github.com/en/developers/apps/about-apps) -to read more about GitHub Apps. - -```powershell -Connect-GitHubAccount -! We added the code to your clipboard: [AB55-FA2E] -Press Enter to open github.com in your browser...: #-> Press enter and paste the code in the browser window -✓ Logged in as octocat! -``` - -After this you will need to install the GitHub App on the repos you want to manage. You can do this by visiting the -[PowerShell for GitHub](https://github.com/apps/powershell-for-github) app page. - -> Info: We will be looking to include this as a check in the module in the future. So it becomes a part of the regular sign in process. - - - -Consecutive runs of the `Connect-GitHubAccount` will not require you to paste the code again unless you revoke the token -or you change the type of authentication you want to use. Instead, it checks the remaining duration of the access token and -uses the refresh token to get a new access token if its less than 4 hours remaining. - -```powershell -Connect-GitHubAccount -✓ Access token is still valid for 05:30:41 ... -✓ Logged in as octocat! -``` - -This is also happening automatically when you run a command that requires authentication. The validity of the token is checked before the command is executed. -If it is no longer valid, the token is refreshed and the command is executed. - -#### Device Flow with OAuth app - -This uses the same flow as above, but instead of using the GitHub App, it uses an OAuth app with long lived tokens. -During the signing you can also authorize the app to access your private repositories. -Visit the [OAuth apps documentation](https://docs.github.com/en/developers/apps/about-apps) to read more about OAuth apps on GitHub. - -```powershell -Connect-GitHubAccount -Mode OAuth - -! We added the code to your clipboard: [AB55-FA2E] -Press Enter to open github.com in your browser...: -✓ Logged in as octocat! -``` - -#### Personal access token - -This is the least secure method of authentication, but it is also the simplest. Running the `Connect-GitHubAccount` command -with the `-AccessToken` parameter will send you to the GitHub site where you can create a new personal access token. -Give it the access you need and paste it into the terminal. - -```powershell -Connect-GitHubAccount -AccessToken -! Enter your personal access token: **************************************** -✓ Logged in as octocat! -``` - -#### System Access Token - -The module also detects the presence of a system access token and uses that if it is present. -This is useful if you are running the module in a CI/CD pipeline or in a scheduled task. -The function looks for the `GH_TOKEN` and `GITHUB_TOKEN` environment variables (in order). - -```powershell -Connect-GitHubAccount -✓ Logged in as system! -``` - -### Command Exploration - -Familiarize yourself with the available cmdlets using the module's comprehensive documentation or inline help. - -```powershell -Get-Command -Module GitHub -``` - -### Sample Scripts - -To be added: Sample scripts demonstrating the module's capabilities. - -## More Information & Resources - -- If you're new to PowerShell or GitHub's REST API, consider checking out the provided beginner guides for both. - -- Explore detailed cmdlet documentation, tutorials, and community-contributed scripts to enhance your GitHub PowerShell experience. - -- Join the community discussions, provide feedback, or contribute to the module's development on the repository's issues and pull requests sections. - -Embrace the efficiency and power of scripting with **GitHub PowerShell** – Your gateway to GitHub automation and integration. - -## PowerShell Module Development and Release Framework - -We utilize the **[PSModule framework](https://github.com/PSModule/)** to streamline our module development and release process. - -- **New-Module**: Quickly set up a consistent module structure that fits with the framework. -- **Build-Module**: Construct the project for deployment to the [PowerShell Gallery](https://www.powershellgallery.com/) and publish documentation for [GitHub Pages](https://pages.github.com/). -- **Test-Module**: Run comprehensive tests ensuring module quality. -- **Release-Module**: Handle versioning, create repository releases, and publish to the PowerShell Gallery and GitHub Pages. - -For a detailed understanding of the framework, [read more about PSModule here](https://github.com/PSModule/). - -## References - -### Official GitHub Resources - -- [REST API Description](https://github.com/github/rest-api-description) -- [GitHub CLI Manual](https://cli.github.com/manual/) -- [GitHub Platform Samples](https://github.com/github/platform-samples) - -### General Web References - -- [Generic HTTP Status Codes (MDN)](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status) - -### Tools Planned for Development - -- [Azure AutoRest (OpenAPI Specification Code Generator)](https://github.com/Azure/autorest) - -### Inspiration Behind the Project - -- [Microsoft's PowerShellForGitHub](https://github.com/microsoft/PowerShellForGitHub) -- [PSGitHub by pcgeek86](https://github.com/pcgeek86/PSGitHub) -- [PSSodium by TylerLeonhardt](https://github.com/TylerLeonhardt/PSSodium) -- [libsodium NuGet Package](https://www.nuget.org/packages/Sodium.Core/) -- [GitHubActions by ebekker](https://github.com/ebekker/pwsh-github-action-tools) -- [powershell-devops by smokedlinq](https://github.com/smokedlinq/powershell-devops) -- [GitHubActionsToolkit by hugoalh-studio](https://github.com/hugoalh-studio/ghactions-toolkit-powershell) - -### Authentication and Login - -- [PowerShell for GitHub on GitHub Marketplace](https://github.com/apps/powershell-for-github) -- [Building a CLI with a GitHub App](https://docs.github.com/en/apps/creating-github-apps/writing-code-for-a-github-app/building-a-cli-with-a-github-app) - -### Module Configuration and Environment - -- [GH Environment for GitHub CLI](https://cli.github.com/manual/gh_help_environment) +# A GitHub & PowerShell development framework + +We empower PowerShell-savvy developers to effortlessly transform their ideas into impactful solutions. +Our approach centers around a development framework that allows developers to focus on delivering value through their code. +By leveraging the GitHub platform and PowerShell, we aim to automate the repetitive tasks, enabling developers — whether as consumers or contributors + — to concentrate on coding without distractions. + +## Supported Platforms + +This development framework is built to serve the needs of modern developers and environments. We prioritize supporting the latest Long-Term Servicing +(LTS) version of PowerShell to ensure that we can leverage the most recent features and capabilities, keeping our framework aligned with the demands +of today’s development landscape. We assume most of the users of this framework work on modern platforms and have access to the latest versions of +PowerShell or seek to use it to develop solutions intended to run on modern systems, like GitHub Actions, Azure Functions on a developer machine. + +### The Trade-Off: Not Supporting Windows PowerShell + +We’ve made a deliberate choice not to actively persure to support the older Windows PowerShell (5.1) version, as it limits our ability to use the +newest PowerShell features. Where its low effort to support Windows PowerShell, we will do so, but we will not actively develop modules for it. +While we recognize that some users may still rely on Windows PowerShell 5.1, they can run tools developed in this framework by installing +PowerShell 7 alongside it or on remote systems. This decision ensures that this framework can focus on delivering new features for modern development +without being constrained by legacy technology, which would otherwize require significant effort to develop and maintain, even if it is available in +the newer versions of PowerShell. + +## Products and projects we focus on + +Our framework is dedicated to advancing the tools and processes that empower modern development and operations teams, with a specific focus on GitHub +as our primary toolstack. We concentrate on the following key areas: + +- PowerShell modules +- GitHub Actions and Workflows +- Serverless applications using Function Apps in Azure + +### PowerShell modules + +
+ About + +A PowerShell module is a set of functions, scripts, and cmdlets that are bundled together in a single package. Modules are used to organize and distribute code in a way that is easy to use and share. They can be used to extend the functionality of PowerShell, automate tasks, and create reusable code that can be shared with others. +We have created a framework that automates the process of creating, testing, and publishing PowerShell modules to the PowerShell Gallery. This framework is designed to make it easy for developers to create and share their PowerShell modules with the community. + +
+ +
+ How we do it in PSModule + +Projects based on the `Template-PSModule` repository template will automatically have the necessary workflows and configurations set up to automate the process of creating, testing, and publishing PowerShell modules to the PowerShell Gallery. This includes workflows for building, testing, and releasing the module, as well as a configuration file for setting up the module's metadata and dependencies. +Using custom properties we set `RepoType` to `Module`. +We use branch policies to control the flow of changes to the `main` branch, and we use labels to control the versioning of the module when a pull request is merged. + +
+ +
+ Create a new project + +1. [Create a repository based on the template Template-PSModule](https://github.com/new?template_name=Template-PSModule&template_owner=PSModule). The module will by default use the name of the repository. See [Process-PSModule](https://github.com/PSModule/Process-PSModule) for more info on choosing another name than the repository name. +1. Create a repository or organization secret called `APIKEY` holding the API key for the PowerShell Gallery. +1. Configure the settings you want for the repository including a branch policy for the `main` branch. +1. On a topic branch: + 1. develop the code you want to add to your module. + 1. delete the parts you do not need. + 1. update the tests in the `tests` folder. +1. Create a PR. Add a label to the PR depending on what you want to do. + - `Major` - Will create a major release (vX.0.0) when merged. If specified with "Prerelease", a major version will be created using the prerelease tag (vX.0.0-\). + - `Minor` - Will create a minor release (vX.Y.0) when merged. If specified with "Prerelease", a minor version will be created using the prerelease tag (vX.Y.0-\). + - `Patch` - Will create a minor release (vX.Y.Z) when merged. If specified with "Prerelease", a minor version will be created using the prerelease tag (vX.Y.Z-\). A patch version bump is the default if nothing is specified for the PR. + - `Prerelease` - CI will create a prerelease of the module using the branch name as a prerelease tag in the version. This will create both a repository release and a prerelease version of the module on the PowerShell Gallery. +1. Once the PR is created, the [Process-PSModule](https://github.com/PSModule/Process-PSModule) workflow will trigger. +1. When the PR is merged, a release will be created and the module will be published to the PowerShell Gallery with a stable version based on the version bump indicator the PR was was labeled with. Prerelease tags will be cleaned up on the repository. + +
+ +
+ Modules delivered on the PowerShell Gallery + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionVersion
AdminA PowerShell module working with the admin role. +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks + PowerShell Gallery Downloads +
+ GitHub release (with filter) + PowerShell Gallery Version +
ASTA PowerShell module for using the Abstract Syntax Tree (AST) to analyze any PowerShell code. +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks + PowerShell Gallery Downloads +
+ GitHub release (with filter) + PowerShell Gallery Version +
AzureDevOpsA PowerShell module to interact with the Azure DevOps REST API. +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks + PowerShell Gallery Downloads +
+ GitHub release (with filter) + PowerShell Gallery Version +
ConfluenceA PowerShell module that interacts with Atlassian Confluence +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks + PowerShell Gallery Downloads +
+ GitHub release (with filter) + PowerShell Gallery Version +
ContextA PowerShell module that manages contexts with secrets and variables. +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks + PowerShell Gallery Downloads +
+ GitHub release (with filter) + PowerShell Gallery Version +
DynamicParamsA PowerShell module that makes it easier to use dynamic params. +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks + PowerShell Gallery Downloads +
+ GitHub release (with filter) + PowerShell Gallery Version +
FontsA PowerShell module for managing fonts. +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks + PowerShell Gallery Downloads +
+ GitHub release (with filter) + PowerShell Gallery Version +
GitHubA PowerShell module to interact with GitHub, both interactively and via automation. +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks + PowerShell Gallery Downloads +
+ GitHub release (with filter) + PowerShell Gallery Version +
GoogleFontsA PowerShell module to download and install fonts from GoogleFonts. +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks + PowerShell Gallery Downloads +
+ GitHub release (with filter) + PowerShell Gallery Version +
GraphQLA PowerShell module to simplify working with a GraphQL APIs. +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks + PowerShell Gallery Downloads +
+ GitHub release (with filter) + PowerShell Gallery Version +
GZipA PowerShell Module that handles GZip archives +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks + PowerShell Gallery Downloads +
+ GitHub release (with filter) + PowerShell Gallery Version +
IPv4A PowerShell module for managing IPv4 data +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks + PowerShell Gallery Downloads +
+ GitHub release (with filter) + PowerShell Gallery Version +
LinkedInA PowerShell module to programmatically interact with LinkedIn +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks + PowerShell Gallery Downloads +
+ GitHub release (with filter) + PowerShell Gallery Version +
NerdFontsA PowerShell module to download and install fonts from NerdFonts. +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks + PowerShell Gallery Downloads +
+ GitHub release (with filter) + PowerShell Gallery Version +
OpenAIA PowerShell module for interacting with OpenAI +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks + PowerShell Gallery Downloads +
+ GitHub release (with filter) + PowerShell Gallery Version +
PATHA PowerShell module to manage the PATH environment variable on Windows. +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks + PowerShell Gallery Downloads +
+ GitHub release (with filter) + PowerShell Gallery Version +
PowerShellGalleryA PowerShell module for interacting with the PowerShell Gallery. +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks + PowerShell Gallery Downloads +
+ GitHub release (with filter) + PowerShell Gallery Version +
PSSemVerA PowerShell module adding a SemVer compatible class and functions. +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks + PowerShell Gallery Downloads +
+ GitHub release (with filter) + PowerShell Gallery Version +
PublicIPA PowerShell module that helps getting info about your public IP. +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks + PowerShell Gallery Downloads +
+ GitHub release (with filter) + PowerShell Gallery Version +
RetryA PowerShell module to create a retry mechanism around functions +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks + PowerShell Gallery Downloads +
+ GitHub release (with filter) + PowerShell Gallery Version +
SodiumA PowerShell module for handling Sodium encrypted secrets. +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks + PowerShell Gallery Downloads +
+ GitHub release (with filter) + PowerShell Gallery Version +
UtilitiesA PowerShell module with a collection of functions that should have been in PowerShell to start with. +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks + PowerShell Gallery Downloads +
+ GitHub release (with filter) + PowerShell Gallery Version +
WoWA PowerShell module containing utilities for World of Warcraft. +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks + PowerShell Gallery Downloads +
+ GitHub release (with filter) + PowerShell Gallery Version +
+ + + +
+ +### PowerShell based Azure Function Apps + +
+ About + +A PowerShell based Azure Function App is a serverless compute service that enables you to run event-driven code without having to manage the infrastructure. Azure Functions are ideal for processing data, integrating systems, and building simple APIs or microservices. They can be triggered by a variety of events, such as HTTP requests, timers, or messages from Azure services like Azure Storage, Event Grid, or Service Bus. +We have created a framework that automates the process of creating, testing, and deploying PowerShell based Azure Function Apps to Azure. This framework is designed to make it easy for developers to create and deploy their Azure Function Apps without having to worry about the underlying infrastructure. + +
+ +
+ How we do it in PSModule + +Projects based on the `Template-FunctionApp` repository template will automatically have the necessary workflows and configurations set up to automate the process of creating, testing, and deploying PowerShell based Azure Function Apps to Azure. This includes workflows for building, testing, and deploying the function app, as well as a configuration file for setting up the function app's metadata and dependencies. +Using custom properties we set `RepoType` to `FunctionApp`. +We use branch policies to control the flow of changes to the `main` branch, and we use labels to control the versioning of the module when a pull request is merged. + +
+ +
+ Create a new project + +1. Create a repository based on the template [Template-FunctionApp](https://github.com/PSModule/Template-FunctionApp). The module will by default use the name of the repository. +1. Create a repository or organization secret called `AZURE_CREDENTIALS`, holding the credentials for the Azure service principal. +1. Configure the settings you want for the repository including a branch policy for the `main` branch. +1. On a topic branch: + 1. develop the code you want to add to your function app. + 1. delete the parts you do not need. + 1. update the tests in the `tests` folder. +1. Create a PR. Add a label to the PR depending on what you want to do. + - `Major` - Will create a major release (vX.0.0) when merged. If specified with "Prerelease", a major version will be created using the prerelease tag (vX.0.0-\). + - `Minor` - Will create a minor release (vX.Y.0) when merged. If specified with "Prerelease", a minor version will be created using the prerelease tag (vX.Y.0-\). + - `Patch` - Will create a minor release (vX.Y.Z) when merged. If specified with "Prerelease", a minor version will be created using the prerelease tag (vX.Y.Z-\). A patch version bump is the default if nothing is specified for the PR. + - `Prerelease` - CI will create a prerelease of the module using the branch name as a prerelease tag in the version. This will create both a repository release and a prerelease version of the module on the PowerShell Gallery. +1. Once the PR is created, the [Process-FunctionApp](https://github.com/PSModule/Process-FunctionApp) workflow will trigger. +1. When the PR is merged, a release will be created and the function app will be deployed to Azure with a stable version based on the version bump indicator the PR was was labeled with. Prerelease tags will be cleaned up on the repository. + +
+ +
+ Function Apps we maintain + + + + + + + + + + + + + + +
NameDescriptionVersion
GitHubApp + A GitHub app running on Azure Function App +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks +
+ GitHub release (with filter) +
+ + + +
+ +### PowerShell based GitHub Actions (composite action) + +
+ About + +A composite action is a reusable action that is made up of one or more steps. Composite actions can be used to encapsulate common tasks or workflows that can be reused across multiple repositories. They are a great way to share code and best practices with the community, and they can help to streamline the development process by providing a consistent way to perform common tasks. +We have created a framework that automates the process of creating, testing, and publishing PowerShell based GitHub Actions to the GitHub Marketplace. This framework is designed to make it easy for developers to create and share their GitHub Actions with the community. + +
+ +
+ How we do it in PSModule + +Projects are based on the `Template-Action` repository template will automatically have the necessary workflows and configurations set up to automate the process of creating, testing, and deploying PowerShell based Azure Function Apps to Azure. This includes workflows for building, testing, and deploying the function app, as well as a configuration file for setting up the function app's metadata and dependencies. +Using custom properties we set `RepoType` to `FunctionApp`. +We use branch policies to control the flow of changes to the `main` branch, and we use labels to control the versioning of the module when a pull request is merged. + +
+ +
+ Create a new project + +1. Create a repository based on the template [Template-Action](https://github.com/PSModule/Template-Action). + +
+ + +
+ GitHub Actions on the GitHub Marketplace + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionVersion
Auto‑Configure + Autmates the configuration of a GitHub repo +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks +
+ GitHub release (with filter) +
Auto‑Document + Automatically creates documentation for actions and workflows +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks +
+ GitHub release (with filter) +
Auto‑Release + Automatically creates releases based on pull requests and labels. +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks +
+ GitHub release (with filter) +
Build‑PSModule + Action that is used to build a PowerShell module. +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks +
+ GitHub release (with filter) +
Debug + Print info from the runner environment to logs +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks +
+ GitHub release (with filter) +
Download‑CIArtifact + Downloads an artifact from a CI workflow +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks +
+ GitHub release (with filter) +
Get‑AppJWT + A GitHub Action that gets a JWT for a GitHub App +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks +
+ GitHub release (with filter) +
Get‑IssueFormData + Get the data from a issue that was generated based on a issue form +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks +
+ GitHub release (with filter) +
GitHub‑Script + A GitHub Action used for running a PowerShell Script that uses the GitHub PowerShell module +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks +
+ GitHub release (with filter) +
Initialize‑PSModule + An action that is used to prepare the runner for PSModule framework. +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks +
+ GitHub release (with filter) +
Invoke‑Pester + +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks +
+ GitHub release (with filter) +
Publish‑PSModule + Action that is used to publish a PowerShell module +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks +
+ GitHub release (with filter) +
Test‑PSModule + Test PowerShell modules with Pester and PSScriptAnalyzer. +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks +
+ GitHub release (with filter) +
+ + + +
+ +### Reusable workflows + +
+ About + +Reusable workflows are a way to define a workflow in one repository and use it in multiple repositories. They can be used to automate common tasks, such as building, testing, and deploying code, and they can help to streamline the development process by providing a consistent way to perform these tasks across multiple repositories. +We have created a framework that automates the process of creating, testing, and deploying reusable workflows in a organization. This framework is designed to make it easy for developers to create and share their workflows with the community. + +
+ +
+ How we do it in PSModule + +Projects are based on the `Template-Workflow` repository template will automatically have the necessary workflows and configurations set up to automate the process of creating, testing, and deploying reusable workflows in a organization. This includes workflows for building, testing, and deploying the workflows, as well as a configuration file for setting up the workflows metadata and dependencies. +Using custom properties we set `RepoType` to `Workflow`. +We use branch policies to control the flow of changes to the `main` branch, and we use labels to control the versioning of the module when a pull request is merged. + +
+ +
+ Create a new project + +1. Create a repository based on the template [Template-Workflow](https://github.com/PSModule/Template-Workflow). + +
+ +
+ Workflows we maintain + + + + + + + + + + + + + + +
NameDescriptionVersion
Process‑PSModule + Process a module from source code to published module. +
+ GitHub Issues + GitHub Pull Requests + GitHub Stars + GitHub Watchers + GitHub Forks +
+ GitHub release (with filter) +
+ + + +