On this page
article
ipm-sync
Synchronize IPM packages in your GitHub Actions workflow
ipm-sync
Synchronizes packages in an existing IPM workspace by running ipm sync. This is the primary action for downloading and updating packages in your CI/CD pipeline.
Authentication is required via the IPM_CLIENT_SECRETS environment variable.
Usage
- uses: ipmhubio/ipm-actions/.github/actions/ipm-sync@v1
with:
working-directory: '.' # Optional
sync-mode: 'KeepAllChanges' # Optional
package-name: '' # Optional
package-names: '' # Optional
env:
IPM_CLIENT_SECRETS: ${{ secrets.IPM_CLIENT_SECRETS }}
Inputs
| Input | Required | Default | Description |
|---|---|---|---|
working-directory |
No | . |
Directory containing the IPM workspace. |
sync-mode |
No | KeepAllChanges |
Controls how local file changes are handled during sync. See Sync Modes below. |
package-name |
No | — | Sync a single specific package by name. |
package-names |
No | — | Sync multiple packages. Separate names with semicolons, commas, or spaces. |
hide-banner |
No | false |
Set to true to suppress the IPM CLI banner in the log output. |
ipm-version |
No | latest | Specific IPM version to use, without the v prefix. |
Use either `package-name` or `package-names`, not both. If neither is set, all packages in the workspace are synchronized.
Sync Modes
| Mode | Behavior |
|---|---|
KeepAllChanges |
Preserves all local modifications (default). |
KeepChangesOnly |
Preserves modified files, removes locally added files. |
KeepNewFilesOnly |
Keeps locally added files, overwrites modified files. |
Clean |
Removes all local changes and downloads a fresh copy. |
Examples
Sync all packages in the workspace
- name: Sync IPM packages
uses: ipmhubio/ipm-actions/.github/actions/ipm-sync@v1
with:
working-directory: ./infrastructure
env:
IPM_CLIENT_SECRETS: ${{ secrets.IPM_CLIENT_SECRETS }}
Sync with a clean slate
- name: Sync packages (clean)
uses: ipmhubio/ipm-actions/.github/actions/ipm-sync@v1
with:
working-directory: ./infrastructure
sync-mode: Clean
env:
IPM_CLIENT_SECRETS: ${{ secrets.IPM_CLIENT_SECRETS }}
Sync a specific package
- name: Sync network module
uses: ipmhubio/ipm-actions/.github/actions/ipm-sync@v1
with:
working-directory: ./infrastructure
package-name: 'myorg/virtual-networks'
env:
IPM_CLIENT_SECRETS: ${{ secrets.IPM_CLIENT_SECRETS }}
Sync multiple specific packages
- name: Sync network packages
uses: ipmhubio/ipm-actions/.github/actions/ipm-sync@v1
with:
working-directory: ./infrastructure
package-names: 'myorg/virtual-networks; myorg/storage-accounts'
sync-mode: Clean
env:
IPM_CLIENT_SECRETS: ${{ secrets.IPM_CLIENT_SECRETS }}
Multi-platform sync
jobs:
sync:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Sync packages
uses: ipmhubio/ipm-actions/.github/actions/ipm-sync@v1
with:
working-directory: ./infrastructure
env:
IPM_CLIENT_SECRETS: ${{ secrets.IPM_CLIENT_SECRETS }}