Home

Awesome

<img src="https://raw.githubusercontent.com/phingofficial/phing-github-action/main/action.svg" width="50" /> Phing GitHub Action

Run your Phing Build in your GitHub Actions.

PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant. You can do anything with it that you could do with a traditional build system like GNU make, and its use of simple XML build files and extensible PHP "task" classes make it an easy-to-use and highly flexible build framework.

Configuration

Create your GiTHub Workflow config in .github/workflows/build.yml or similar to run your phing build.xml

name: CI

on: [push]

jobs:
  build-test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Phing Build
        uses: phingofficial/phing-github-action@main

General parameters

parameterdescriptiondefault
buildfilelocation of the build filebuild.xml
targetstargets to run as space separated listn/a
user-propertiesuser properties as space separated list [a=b c=d]n/a
versionphing version to use2.16.3

To execute a build with custom/path/to/build.xml as a phing build file use:

name: CI

on: [push]

jobs:
  build-test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Phing Build
        uses: phingofficial/phing-github-action@main
        with:
            buildfile: custom/path/to/build.xml

Run targets:

name: CI

on: [push]

jobs:
  build-test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Phing Build
        uses: phingofficial/phing-github-action@main
        with:
            targets: build deploy

Invoke with user properties:

name: CI

on: [push]

jobs:
  build-test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Phing Build
        uses: phingofficial/phing-github-action@main
        with:
            user-properties: foo=bar my=self you=too

Control output:

parameterdescription
quietbe extra quiet
silentprint nothing but task outputs and build failures
verbosebe extra verbose
debugprint debugging information
emacsproduce logging information without adornments
longtargetsshow target descriptions during build

It does not matter which value was set to activate the options. So verbose: false will also enable verbose logging.

name: CI

on: [push]

jobs:
  build-test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Phing Build
        uses: phingofficial/phing-github-action@main
        with:
            verbose: true
            debug: true

Versions

By default, the action will use phing 2.16.3. To change that behavior use the action with the version parameter.

name: CI

on: [push]

jobs:
  build-test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Phing Build
        uses: phingofficial/phing-github-action@main
        with:
            version: 3.0.0-alpha4

Phing in Action

Example "Phing Build" Project