diff --git a/README.md b/README.md index 6d1d0bb..ae3074d 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,10 @@ jobs: uses: actions/checkout@v1 - name: Run build-tools build command - uses: buildtools/build-action@v1 + uses: buildtool/build-action@v1 + with: + dockerfile: dockerfiles/Dockerfile.build + docker-build-args: '--build-arg abc=123' ``` ## Customizing @@ -40,10 +43,14 @@ jobs: Following inputs can be used as `step.with` keys -| Name | Type | Default | Description | -|---------------------------|---------|-----------|------------------------------------------| -| ` additional-docker-args` | String | | Extra arguments to `docker build`, supports `-f ` and multiple `--build-arg =` params | +| Name | Type | Default | Description | +|---------------------------|---------|-----------------|-----------------------------------------------| +| ` dockerfile` | String | `Dockerfile` | To use a specific Dockerfile in your project | +| ` docker-build-args` | String | | Docker [build-arg] | + ## License -MIT. See `LICENSE` for more details. \ No newline at end of file +MIT. See `LICENSE` for more details. + +[build-arg]: https://docs.docker.com/engine/reference/commandline/#set-build-time-variables---build-arg \ No newline at end of file diff --git a/action.yml b/action.yml index 1a1952a..41d1424 100644 --- a/action.yml +++ b/action.yml @@ -1,14 +1,19 @@ name: 'GitHub Action for Build' description: 'Build docker image' inputs: - additional-docker-args: - description: 'extra docker arguments' + dockerfile: + description: 'specify Dockerfile to use' + required: false + default: 'Dockerfile' + docker-build-args: + description: 'docker build-args arguments' required: false runs: using: 'docker' image: 'Dockerfile' args: - - ${{ inputs.additional-docker-args }} + - -f ${{ inputs.dockerfile }} + - ${{ inputs.docker-build-args }} branding: icon: 'package' color: 'green' \ No newline at end of file