mirror of
https://github.com/containers/podman.git
synced 2025-10-25 10:16:43 +08:00
[CI:BUILD] Build universal Podman binary for Mac installer
Build universal Podman binary and installer for Mac. Update GitHub action to build it too. Signed-off-by: Ashley Cui <acui@redhat.com>
This commit is contained in:
22
.github/workflows/mac-pkg.yml
vendored
22
.github/workflows/mac-pkg.yml
vendored
@ -67,6 +67,7 @@ jobs:
|
||||
URI="https://github.com/containers/podman/releases/download/${{steps.getversion.outputs.version}}"
|
||||
ARM_FILE="podman-installer-macos-arm64.pkg"
|
||||
AMD_FILE="podman-installer-macos-amd64.pkg"
|
||||
UNIVERSAL_FILE="podman-installer-macos-universal.pkg"
|
||||
|
||||
status=$(curl -s -o /dev/null -w "%{http_code}" "${URI}/${ARM_FILE}")
|
||||
if [[ "$status" == "404" ]] ; then
|
||||
@ -83,10 +84,19 @@ jobs:
|
||||
echo "::warning::AMD installer already exists, skipping"
|
||||
echo "buildamd=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
status=$(curl -s -o /dev/null -w "%{http_code}" "${URI}/${UNIVERSAL_FILE}")
|
||||
if [[ "$status" == "404" ]] ; then
|
||||
echo "builduniversal=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "::warning::Universal installer already exists, skipping"
|
||||
echo "builduniversal=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
- name: Checkout Version
|
||||
if: >-
|
||||
steps.check.outputs.buildamd == 'true' ||
|
||||
steps.check.outputs.buildarm == 'true' ||
|
||||
steps.check.outputs.builduniversal == 'true' ||
|
||||
steps.actual_dryrun.outputs.dryrun == 'true'
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
||||
with:
|
||||
@ -96,6 +106,7 @@ jobs:
|
||||
if: >-
|
||||
steps.check.outputs.buildamd == 'true' ||
|
||||
steps.check.outputs.buildarm == 'true' ||
|
||||
steps.check.outputs.builduniversal == 'true' ||
|
||||
steps.actual_dryrun.outputs.dryrun == 'true'
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
@ -104,6 +115,7 @@ jobs:
|
||||
if: >-
|
||||
steps.check.outputs.buildamd == 'true' ||
|
||||
steps.check.outputs.buildarm == 'true' ||
|
||||
steps.check.outputs.builduniversal == 'true' ||
|
||||
steps.actual_dryrun.outputs.dryrun == 'true'
|
||||
run: |
|
||||
echo $APPLICATION_CERTIFICATE | base64 --decode -o appcert.p12
|
||||
@ -129,10 +141,17 @@ jobs:
|
||||
run: |
|
||||
make ARCH=amd64 notarize &> /dev/null
|
||||
cd out && shasum -a 256 podman-installer-macos-amd64.pkg >> shasums
|
||||
- name: Build and Sign Universal
|
||||
if: steps.check.outputs.builduniversal == 'true' || steps.actual_dryrun.outputs.dryrun == 'true'
|
||||
working-directory: contrib/pkginstaller
|
||||
run: |
|
||||
make ARCH=universal notarize &> /dev/null
|
||||
cd out && shasum -a 256 podman-installer-macos-universal.pkg >> shasums
|
||||
- name: Artifact
|
||||
if: >-
|
||||
steps.check.outputs.buildamd == 'true' ||
|
||||
steps.check.outputs.buildarm == 'true' ||
|
||||
steps.check.outputs.builduniversal == 'true' ||
|
||||
steps.actual_dryrun.outputs.dryrun == 'true'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
@ -144,7 +163,8 @@ jobs:
|
||||
if: >-
|
||||
steps.actual_dryrun.outputs.dryrun == 'false' &&
|
||||
(steps.check.outputs.buildamd == 'true' ||
|
||||
steps.check.outputs.buildarm == 'true')
|
||||
steps.check.outputs.buildarm == 'true'||
|
||||
steps.check.outputs.builduniversal == 'true' )
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user