Skip to content

MunkiPkg Action

Actions
GitHub Action to build a macOS package for release
v1.5
Latest
Star (1)

munkipkg-action

This action utilizes Greg Neagle's excellent pkg building tool munkipkg

MunkiPkg action will create a build artifact in the build directory build/*.pkg and will output the version of the pkg being built.

  • Note: Must be run on a macos runner.

Inputs

Input type Example/Default Description
munkipkg_version string (optional) https://raw.githubusercontent.com/munki/munki-pkg/8d68abbab4c459857d28fdd84ad668ec6ccdf98a/munkipkg Location of munkipkg script. This will be downloaded by the action.
pkg_subdir string (optional) ""/"subfolder" Location of folder to pkg. Defaults to the root of the repo

Outputs

Output type Example Description
tag string v1.0 OR v8.8.2 Returns the pkg version from the build-info file.
filename string pkg-name.pkg Returns the filename of the built pkg.
filepath string /Users/runner/work/pkg-name/test-munki-pkg/build/pkg-name-1.0.pkg Returns the filepath of the built pkg.

Usage

...
    steps:
      - uses: actions/checkout@v2
      - name: Munkpkg
        id: munkipkg
        uses: joncrain/[email protected]

If your MunkiPkg build file includes a certificate, you can store the certificate and password in a GitHub secret and use them in the build process by using the apple-actions/import-codesign-cert action in your workflow. You can also create a release based on the version from the build file.

on:
  workflow_dispatch: # manually triggered

jobs:
  munkipkg:
    runs-on: macos-latest
    timeout-minutes: 5 # Keeps your builds from running too long
    steps:
      - name: Checkout (this repo of a munkipkg project)
        uses: actions/checkout@v2
        with:
          lfs: true

      - name: Import Signing Cert
        uses: apple-actions/import-codesign-certs@v1
        with:
          p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
          p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}

      - name: Run munkipkg
        id: munkipkg
        uses: joncrain/[email protected]

      - name: Create Release
        uses: softprops/action-gh-release@affa18ef97bc9db20076945705aba8c516139abd
        with:
          files: ${{ steps.munkipkg.outputs.filepath }}
          tag_name: ${{ steps.munkipkg.outputs.tag }}
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

MunkiPkg Action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

GitHub Action to build a macOS package for release
v1.5
Latest

MunkiPkg Action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.