GitHub Setup
Configure the GitHub Actions packaging pipeline that downloads apps from Winget and uploads them to Intune.
Overview
IntuneGet uses GitHub Actions to:
- Download applications from Winget
- Package them as
.intunewinfiles using IntuneWinAppUtil.exe - Upload the packaged app to Microsoft Intune
- Report status back to the web application
Windows Runner Required
The workflow runs on a Windows runner because IntuneWinAppUtil.exe is a Windows-only tool.
Fork Setup
Fork the Repository
- Go to github.com/ugurkocde/IntuneGet
- Click Fork in the top right
- Select your account/organization
- Wait for the fork to complete
Configure Repository Secrets
Navigate to your forked repository and add secrets:
Settings > Secrets and variables > Actions > New repository secret
| Secret Name | Description | How to Get |
|---|---|---|
AZURE_CLIENT_ID | Azure AD Application ID | From Azure AD app registration |
AZURE_CLIENT_SECRET | Azure AD Client Secret | From Azure AD app registration |
CALLBACK_SECRET | Webhook verification secret | Generate with openssl rand -hex 16 |
Secret Must Match
The CALLBACK_SECRET must be the same value in both GitHub Secrets and your web app's environment variables.
Enable GitHub Actions
GitHub disables workflows in forks by default. Enable them:
- Go to the Actions tab in your fork
- Click I understand my workflows, go ahead and enable them
Create Personal Access Token
Create a PAT that allows IntuneGet to trigger workflows:
- Go to github.com/settings/tokens
- Click Generate new token (classic)
- Set a descriptive name:
IntuneGet Pipeline - Select scopes:
repo(Full control of private repositories)workflow(Update GitHub Action workflows)
- Click Generate token
- Copy the token immediately
For enhanced security, use a fine-grained token:
- Repository access: Select your fork only
- Permissions:
- Actions: Read and write
- Contents: Read
Update Your Environment
In your IntuneGet deployment, update these environment variables to point to your fork:
GITHUB_OWNER=your-github-username
GITHUB_REPO=IntuneGet
GITHUB_PAT=ghp_your-personal-access-token
CALLBACK_SECRET=same-secret-as-in-githubHow the Pipeline Works
Workflow Inputs
When triggered, the workflow receives:
| Input | Description |
|---|---|
app_id | Winget package identifier |
deployment_id | Unique deployment tracking ID |
tenant_id | Target Microsoft 365 tenant |
callback_url | URL to report status back |
Workflow Steps
- Download App: Uses Winget to download the installer
- Package: Runs IntuneWinAppUtil.exe to create .intunewin file
- Authenticate: Gets access token for Intune API
- Upload: Uploads package to customer's Intune tenant
- Report: Calls callback URL with status
Testing the Pipeline
Test the pipeline manually before integrating:
- Go to Actions in your fork
- Select the Package Intunewin workflow
- Click Run workflow
- Fill in test values:
app_id:Microsoft.VisualStudioCodedeployment_id:test-123tenant_id:Your test tenantcallback_url:Your deployment URL + /api/callback
- Click Run workflow
Cost Considerations
GitHub Actions Usage
- Public repos: Free
- Private repos: 2,000 minutes/month free, then $0.008/minute for Windows runners
Each packaging job typically takes 2-5 minutes.
Self-Hosted Runner (Optional)
For enterprises wanting to use their own infrastructure:
- Windows 10/11 or Windows Server 2019+
- PowerShell 5.1+
- At least 4GB RAM
- 20GB+ free disk space
- Internet access
- In your repository, go to Settings > Actions > Runners
- Click New self-hosted runner
- Select Windows and follow the instructions
Update the workflow to use your runner:
jobs:
package:
runs-on: self-hosted # Changed from windows-latestCommon Issues
Workflow not triggering
- Verify PAT has correct scopes (repo + workflow)
- Check workflow is enabled in the Actions tab
- Verify GITHUB_OWNER and GITHUB_REPO are correct
IntuneWinAppUtil fails
- Check app ID is valid in Winget
- Verify the app has a supported installer type
- Check runner has enough disk space
Callback fails
- Verify CALLBACK_SECRET matches in both places
- Check NEXT_PUBLIC_URL is accessible from GitHub
- Review callback endpoint logs
Next Steps
GitHub pipeline is configured! Now choose your deployment method.