diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7facb93 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM composer:latest + +RUN composer global require tightenco/duster --no-progress --dev +ENV PATH="/tmp/vendor/bin:${PATH}" + +COPY "entrypoint.sh" "/entrypoint.sh" +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/entrypoint.sh"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..969dbc2 --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +# GitHub Action for Tighten Duster + +GitHub Action for the [Tighten Duster](https://github.com/tighten/duster) package. + +## Usage + +Use with [GitHub Actions](https://github.com/features/actions) + +```yml +# .github/workflows/duster.yml +name: Duster +on: pull_request +jobs: + duster: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: "duster" + uses: tighten/duster-action@v1 +``` + +To use additional Duster options use `args`: + +```yml +# .github/workflows/duster.yml +name: Duster +on: pull_request +jobs: + duster: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: "duster" + uses: tighten/duster-action@v1 + with: + args: --using=tlint,pint +``` diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..0089d03 --- /dev/null +++ b/action.yml @@ -0,0 +1,8 @@ +name: Tighten Duster +description: Automatically apply Tighten's default code style for Laravel apps. +branding: + icon: 'plus' + color: 'yellow' +runs: + using: docker + image: Dockerfile diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..d41546e --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh -l + +set -e + +echo "Running: duster" $* + +duster --version +duster $*