Run Pipeline
The Run Pipeline action executes the complete build and test pipeline for AL-Go repositories. This action handles compilation, testing, artifact generation, and all other build-related tasks for Business Central projects.Overview
This composite action orchestrates the entire build process, including:- Building AL projects with specified build modes
- Installing dependencies and test apps
- Running tests against baselines
- Creating and managing build artifacts
- Setting up and managing Docker containers for builds
Before running this action, you must first execute both
ReadSettings and ReadSecrets actions to populate the required environment variables.Inputs
The shell in which to run the PowerShell script. Choose between:
powershell- Windows PowerShell 5.1pwsh- PowerShell 7+
The GitHub token for authenticating API calls and accessing repository resources during the pipeline run.
ArtifactUrl to use for the build. This specifies which Business Central artifacts (Docker images) should be used as the build environment. If not specified, the value from settings will be used.
Project folder path relative to the repository root. Use this when your repository contains multiple projects. The default
. indicates the root project.Specifies the mode to use for build steps. Build modes can customize compiler settings, output paths, and other build-specific configurations. Common values include:
Default- Standard build modeClean- Clean build from scratch- Custom build modes defined in your settings
Path to a JSON-formatted file containing a list of apps to install before building. Use this to specify runtime dependencies required for your project.Example format:
Path to a JSON-formatted file containing a list of test apps to install. These apps are typically required for running tests but not for runtime operation.
The run ID of a baseline workflow to compare against. Used for baseline testing to ensure new changes don’t break existing functionality.
The Git SHA of the baseline workflow run. This ensures you’re comparing against a specific version of the codebase.
Outputs
This action produces environment variables rather than direct outputs:Environment Variables
The name of the Docker container that was created and used during the build process. This can be useful for debugging or additional post-build operations.
Prerequisites
Before using this action, ensure you have:- ReadSettings: The
env.Settingsvariable must be populated by calling theReadSettingsaction - ReadSecrets: The
env.Secretsvariable must contain all necessary secrets including:licenseFileUrl- URL to the Business Central license filecodeSignCertificateUrl- URL to code signing certificate (if using code signing)codeSignCertificatePassword- Password for the code signing certificatekeyVaultCertificateUrl- Azure Key Vault certificate URL (if using Key Vault)keyVaultCertificatePassword- Key Vault certificate passwordkeyVaultClientId- Azure Key Vault client IDgitHubPackagesContext- Context for GitHub Packages authenticationapplicationInsightsConnectionString- Application Insights connection string (if using telemetry)
Usage Example
Here’s a complete example showing how to use the Run Pipeline action in a workflow:Advanced Usage
Using Custom Artifacts
Running with Baseline Comparison
Installing Dependencies
Troubleshooting
Container Name Not Set
If thecontainerName environment variable is not being set, ensure:
- Docker is properly installed and running on the runner
- The runner has permissions to create Docker containers
- Artifact URL is valid and accessible
Build Failures
Common causes of build failures:- Missing or invalid license file URL in secrets
- Incorrect artifact URL or version
- Missing dependencies in
installAppsJson - Insufficient runner resources
Baseline Comparison Issues
When using baseline comparison:- Verify the workflow run ID exists and is accessible
- Ensure the SHA matches a valid commit in your repository
- Check that baseline artifacts are still available
Related Actions
- Read Settings - Required prerequisite
- Read Secrets - Required prerequisite