Github 自托管操作无法设置 PHP 7.3

Github actions self-hosted cannot setup PHP 7.3

我有一个 deployment.yml 文件,用于通过 Github 操作在自托管 ubuntu 服务器上部署 Laravel 应用程序,但不幸的是我 运行 到这个错误

==> Setup PHP
✗ PHP Could not setup PHP 7.3
Error: The process '/bin/bash' failed with exit code 1

我该如何解决这个错误?

deployment.yml 文件

on:
  push:
    branches:
     - master

jobs:
  create-deployment-artifacts:
    name: create deployment artifacts
    runs-on: self-hosted

    steps:
    - uses: actions/checkout@v2

    - name: Configure PHP 7.3
      uses: shivammathur/setup-php@v2
      with:
        php-version: '7.3'
        tools: composer, phpunit
        extensions: mbstring,PDO,grpc,tokenizer,xml,json,ctype,fileinfo,openssl,bcmath

    - name: Install Dependencies
      run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

    - name: Compile Assets
      run: |
         npm install
         npm run prod

    - name: Copy .env
      run: php -r "file_exists('.env') || copy('.env.example', '.env');"

    - name: Generate key
      run: php artisan key:generate

    - name: Directory Permissions
      run: chmod -R 777 storage bootstrap/cache

请在 setup-php 步骤中将环境变量 runner 设置为 self-hosted

文档:https://github.com/shivammathur/setup-php#self-hosted-setup

- name: Configure PHP 7.3
  uses: shivammathur/setup-php@v2
  env:
    runner: self-hosted
  with:
    php-version: '7.3'
    tools: composer, phpunit
    extensions: mbstring,PDO,grpc,tokenizer,xml,json,ctype,fileinfo,openssl,bcmath

如果仍然失败,请创建一个问题here