Overview
AL-Go system files include:- Workflow files in
.github/workflows/ - System scripts in
.AL-Go/ - Helper scripts and configuration files
- Access to new AL-Go features
- Bug fixes and security patches
- Performance improvements
- Compatibility with latest Business Central versions
The CI/CD workflow automatically checks for updates and notifies you when they’re available.
When to Update
Automatic Notifications
Every CI/CD run checks for updates. You’ll see a notification if updates are available:Manual Checks
Run this workflow periodically to ensure you’re on the latest version, especially:- Before creating releases
- When troubleshooting issues
- After major AL-Go announcements
- Monthly as part of maintenance
Prerequisites
Setting Up ghTokenWorkflow
Create Personal Access Token
Generate a GitHub Personal Access Token (PAT):
- Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
- Click Generate new token (classic)
- Name it
AL-Go Workflow Token - Select scopes:
repo(Full control of private repositories)workflow(Update GitHub Action workflows)
- Click Generate token and copy the token
The
ghTokenWorkflow secret allows the workflow to create pull requests that trigger other workflows. The default GITHUB_TOKEN cannot do this due to security restrictions.Triggering the Workflow
Manual Trigger
Automatic Trigger via Workflow Call
The workflow can be called from other workflows:Workflow Parameters
Template Repository URLOverride the default template repository URL.
- Leave empty to use the URL from AL-Go settings
- Specify
{owner}/{repo}@{branch}to use a different template
microsoft/AL-Go-PTE@mainDefault: Uses templateUrl from .github/AL-Go-Settings.jsonDownload latest from template repositoryWhen true, downloads the latest version from the template.
When false, uses a previously cached version.Example:
trueDirect Commit?Controls how updates are applied:
false: Creates a pull request (recommended)true: Commits directly to the branch
falseBranches to updateComma-separated list of branches to update. Supports wildcards.
- Leave empty to update current branch only
main,release/*: Update main and all release branches*: Update all branches (use with caution)
main,release/*Default: Current branch onlyWorkflow Jobs
Initialize
Determines which branches to update and which template to use.Actions Performed:
- Reads AL-Go settings to get the template URL
- Resolves branch patterns to actual branch names
- Determines the template URL (from input or settings)
- Validates configuration
includeBranchesparameter is expanded- Wildcards like
release/*match all release branches - Each matched branch gets its own update job
Update AL-Go System Files (per branch)
Updates system files for each branch.Update Process:
- Checkout: Checks out the target branch
- Read Settings: Reads branch-specific AL-Go settings
- Read Secrets: Retrieves
ghTokenWorkflowsecret - Download Template: Downloads latest from template repository
- Compare Files: Identifies differences
- Update Files: Updates system files
- Create PR or Commit: Either creates a pull request or commits directly
- Compares your files with template files
- Identifies new, updated, and removed files
- Preserves your custom changes to non-system files
- Warns about local modifications to system files
What Gets Updated
System Files
The workflow updates these files:Workflow Files
Location:
.github/workflows/CICD.yamlCreateRelease.yamlPullRequestHandler.yamlPublishToEnvironment.yamlUpdateGitHubGoSystemFiles.yaml- All other workflow files from template
System Scripts
Location:
.AL-Go/- Helper scripts
- Configuration templates
- Action implementations
Files NOT Updated
These files are never modified:- Your AL application code
AL-Go-Settings.json(only structure may be validated)- Custom workflow files you’ve added
- Project-specific configuration files
- Repository secrets and settings
If you’ve modified system files, the workflow will warn you and may revert your changes. Keep customizations in separate files when possible.
Update Pull Request
WhendirectCommit is false (recommended), the workflow creates a pull request:
PR Contents
- Title:
Update AL-Go System Files - Description: Summary of changes from the template
- Changes: All updated system files
- Branch:
update-al-go-system-files/{timestamp}or similar
Reviewing the PR
Review Changes
Examine the changes to understand what’s being updated:
- New features or improvements
- Bug fixes
- Configuration changes
- Removed deprecated files
Check for Conflicts
If you’ve customized system files, ensure the update doesn’t break functionality.
Multi-Branch Updates
Update multiple branches simultaneously:Example: Update Main and Release Branches
Run Workflow
Set parameters:
- templateUrl: (leave empty)
- downloadLatest:
true - directCommit:
false - includeBranches:
main,release/*
Each branch is updated independently, allowing you to test updates on release branches before applying to main.
Template Repositories
AL-Go supports two template types:Per-Tenant Extension
Template:
microsoft/AL-Go-PTEFor Business Central Per-Tenant Extensions with optional PowerPlatform integration.AppSource App
Template:
microsoft/AL-Go-AppSourceFor Business Central AppSource apps with AppSource submission workflows.Using a Custom Template
You can fork the AL-Go template and use your custom version:- Fork the template repository
-
Update AL-Go-Settings.json:
- Run the update workflow to sync with your custom template
Handling Modified System Files
If you’ve modified AL-Go system files:The Problem
AL-Go doesn’t support modifications to system files and will:- Detect the modifications
- Warn about them in CI/CD runs
- Revert them when updating
The Solution
Create Custom Workflows
For workflow customizations, create separate workflow files that call the system workflows.
If you absolutely need custom behavior, fork the template repository and maintain your own template.
Commit Options
The workflow respectscommitOptions in AL-Go settings:
Troubleshooting
ghTokenWorkflow Not Found
Ensure the secret is created with
workflow scope. Check that it’s not expired.Update Fails with Conflicts
Your system files may have custom changes. Review the conflicts and decide whether to keep or remove customizations.
PR Not Created
Verify
ghTokenWorkflow secret exists and directCommit is false. Check workflow permissions.No Updates Found
You’re already on the latest version. No action needed.
Update Frequency
Recommended Schedule
Production Repositories
Monthly or when notified of critical updatesBalance stability with new features.
Development Repositories
Weekly or after each AL-Go releaseStay current with latest features.
Monitoring Updates
- Watch the AL-Go repository for releases
- Check CI/CD workflow outputs for update notifications
- Review AL-Go release notes for breaking changes
Best Practices
Update Dependencies Together
If updating multiple branches, update them at the same time for consistency.
Avoid Modifying System Files
Use AL-Go settings and custom workflows instead of modifying system files.
Example Scenarios
Scenario 1: Regular Monthly Update
Run Update Workflow
- templateUrl: (empty)
- downloadLatest:
true - directCommit:
false - includeBranches:
main
Scenario 2: Update All Branches
Run Update Workflow
- templateUrl: (empty)
- downloadLatest:
true - directCommit:
false - includeBranches:
main,release/*,feature/*
Scenario 3: Switch Templates
Run Update Workflow
- templateUrl: (empty, uses new setting)
- downloadLatest:
true - directCommit:
false - includeBranches: (empty)
Advanced: Workflow Integration
Call the update workflow from other workflows:Automated updates help you stay current, but always review PRs before merging.