Skip to content

Cannot write in $RUNNER_TEMP #3028

@mmorier

Description

@mmorier

Describe the bug
I used Github Actions on macos runners for buillding and siging iOS applications.
I follow this documentation and it works perfectly on runners macos-latest. If I set macos-13 because I need Xcode 15, I have the following error :

  shell: /bin/bash -e {0}
  env:
    CERTIFICATE_BASE64: ***  
    P12_PASSWORD: ***
    KEYCHAIN_PASSWORD: ***
    MD_APPLE_SDK_ROOT: /Applications/Xcode_15.0.1.app
base64: invalid argument --output
Usage:	base64 [-hDd] [-b num] [-i in_file] [-o out_file]
  -h, --help     display this message
  -Dd, --decode   decodes input
  -b, --break    break encoded string into num character lines
  -i, --input    input file (default: "-" for stdin)
  -o, --output   output file (default: "-" for stdout)
security: Error reading infile /Users/runner/work/_temp/certificate.p12: No such file or directory

If I run the same script on macos-latest runner, everything is OK and I have the following log :

   shell: /bin/bash -e {0}
  env:
    CERTIFICATE_BASE64: ***
    P12_PASSWORD: ***
    KEYCHAIN_PASSWORD: ***
1 identity imported.

If I display $CERTIFICATE_PATH (CERTIFICATE_PATH=$RUNNER_TEMP/certificate.p12), it displays the same path (/Users/runner/work/_temp/certificate.p12) for both runners but it seems macos-13 runner has not the same rights to allow base64` command writing in it.

So I am totally blocked to build a new signed IPA because I need Xcode 15 and it fails because no certificate can be installed in the keychain for signing the IPA.

I tried to create file with the command touch $CERTIFICATE_PATH and I have no issue with this command but after base64 cannot did its job :

 base64: invalid argument --output
Usage:	base64 [-hDd] [-b num] [-i in_file] [-o out_file]
  -h, --help     display this message
  -Dd, --decode   decodes input
  -b, --break    break encoded string into num character lines
  -i, --input    input file (default: "-" for stdin)
  -o, --output   output file (default: "-" for stdout)
security: SecKeychainItemImport: One or more parameters passed to a function were not valid.

To Reproduce
Steps to reproduce the behavior:

  1. follow https://docs.github.com/en/actions/deployment/deploying-xcode-applications/installing-an-apple-certificate-on-macos-runners-for-xcode-development#add-a-step-to-your-workflow
  2. execute the step Install the Apple certificate and provisioning profile on macos-13 runner, checked everything works on macos-12 runnerExpected behavior
   shell: /bin/bash -e {0}
  env:
    CERTIFICATE_BASE64: ***
    P12_PASSWORD: ***
    KEYCHAIN_PASSWORD: ***
1 identity imported.

Runner Version and Platform

Image: macos-13
Version: 20231025.2

What's not working?

  shell: /bin/bash -e {0}
  env:
    CERTIFICATE_BASE64: ***  
    P12_PASSWORD: ***
    KEYCHAIN_PASSWORD: ***
    MD_APPLE_SDK_ROOT: /Applications/Xcode_15.0.1.app
base64: invalid argument --output
Usage:	base64 [-hDd] [-b num] [-i in_file] [-o out_file]
  -h, --help     display this message
  -Dd, --decode   decodes input
  -b, --break    break encoded string into num character lines
  -i, --input    input file (default: "-" for stdin)
  -o, --output   output file (default: "-" for stdout)
security: Error reading infile /Users/runner/work/_temp/certificate.p12: No such file or directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions