gon icon indicating copy to clipboard operation
gon copied to clipboard

DMG option fails in GitHub Actions CI process

Open tofi86 opened this issue 4 years ago • 3 comments

Hi,

for the following config

{
  "source" : ["target/EPUB-Checker.app"],
  "bundle_id" : "de.paginagmbh.epubchecker",
  "apple_id": {
    "username" : "",
    "password":  "",
    "provider": ""
  },
  "sign" :{
      "application_identity" : ""
  },
  "dmg" :{
    "output_path":  "target/pagina-EPUB-Checker.dmg",
    "volume_name":  "pagina EPUB-Checker"
  }
}

this GitHub Actions Workflow https://github.com/paginagmbh/EPUB-Checker/blob/development/.github/workflows/release.yml fails when gon is trying to create the DMG:

  • Actions log: https://github.com/paginagmbh/EPUB-Checker/runs/524464217?check_suite_focus=true#step:8:1521
  • Line 1521 ff
  • Actual error: Finder got an error: AppleEvent timed out. (-1712)
[INFO] ==> 📦  Creating dmg...
[INFO]     This will open Finder windows momentarily.
[INFO] {"@level":"info","@message":"executing create-dmg for dmg creation","@module":"dmg","@timestamp":"2020-03-21T20:13:15.326876Z","command_args":["create-dmg","--volname","pagina EPUB-Checker","--add-file","EPUB-Checker.app","./target/EPUB-Checker.app","0","0","./target/pagina-EPUB-Checker.dmg","/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/gon526404065"],"command_path":"/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/createdmg252459530/create-dmg","output_path":"./target/pagina-EPUB-Checker.dmg"}
[INFO] {"@level":"error","@message":"error creating dmg","@module":"dmg","@timestamp":"2020-03-21T20:15:27.890756Z","err":"exit status 64","output":"Creating disk image...\ncreated: /Users/runner/runners/2.165.2/work/EPUB-Checker/EPUB-Checker/target/rw.pagina-EPUB-Checker.dmg\nMounting disk image...\nUnmounting disk image...\nMount directory: /Volumes/pagina EPUB-Checker\nDevice name:     /dev/disk2\nCopying custom files...\n./target/EPUB-Checker.app\nRunning Applescript: /usr/bin/osascript \"/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/createdmg.tmp.XXXXXXXXXX.c9uPdYuX\" \"pagina EPUB-Checker\"\n/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/createdmg.tmp.XXXXXXXXXX.c9uPdYuX:394:406: execution error: Finder got an error: AppleEvent timed out. (-1712)\nFailed running AppleScript\n\"disk2\" ejected.\n"}
[INFO] ❗️ Error creating dmg:
[INFO] 
[INFO] error creating dmg:
[INFO] 
[INFO] Creating disk image...
[INFO] created: /Users/runner/runners/2.165.2/work/EPUB-Checker/EPUB-Checker/target/rw.pagina-EPUB-Checker.dmg
[INFO] Mounting disk image...
[INFO] Unmounting disk image...
[INFO] Mount directory: /Volumes/pagina EPUB-Checker
[INFO] Device name:     /dev/disk2
[INFO] Copying custom files...
[INFO] ./target/EPUB-Checker.app
[INFO] Running Applescript: /usr/bin/osascript "/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/createdmg.tmp.XXXXXXXXXX.c9uPdYuX" "pagina EPUB-Checker"
[INFO] /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/createdmg.tmp.XXXXXXXXXX.c9uPdYuX:394:406: execution error: Finder got an error: AppleEvent timed out. (-1712)
[INFO] Failed running AppleScript
[INFO] "disk2" ejected.
[INFO] 
[INFO] [ERROR] Command execution failed.

Do you have any idea why this might happen?

Thanks and best regards, Tobias

tofi86 avatar Mar 22 '20 01:03 tofi86

P.S. locally, the same maven build process including gon works as expected...

tofi86 avatar Mar 22 '20 01:03 tofi86

Did you ever get this to work? I'm curious if you're running into the problem of accepting prompts as documented in the README https://github.com/mitchellh/gon#prompts or if you found a way around them?

simar7 avatar Aug 13 '20 03:08 simar7

Not sure if this helps.. https://github.com/herrbischoff/awesome-macos-command-line#disk-images

The issue is it works only on a desktop with GUI access.

Did anyone get this working for GitHub Actions/Non-TTY environment?

devinstasafe avatar Jul 07 '21 10:07 devinstasafe