Skip to content
skip-forward

GitHub Action

Run a Phing Build

v2.0.0 Latest version

Run a Phing Build

skip-forward

Run a Phing Build

Run your Phing Build in your GiTHub Action

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Run a Phing Build

uses: phingofficial/phing-github-action@v2.0.0

Learn more about this action in phingofficial/phing-github-action

Choose a version

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

parameter description default
buildfile location of the build file build.xml
targets targets to run as space separated list n/a
user-properties user properties as space separated list [a=b c=d] n/a
version phing version to use 2.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:

parameter description
quiet be extra quiet
silent print nothing but task outputs and build failures
verbose be extra verbose
debug print debugging information
emacs produce logging information without adornments
longtargets show 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