Skip to content
This repository has been archived by the owner on Oct 6, 2021. It is now read-only.

Commit

Permalink
feat: split input parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-svensson committed Nov 12, 2019
1 parent e576d81 commit 0a302f2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 <Dockerfile>` and multiple `--build-arg <KEY>=<VALUE>` 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.
MIT. See `LICENSE` for more details.

[build-arg]: https://docs.docker.com/engine/reference/commandline/#set-build-time-variables---build-arg
11 changes: 8 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit 0a302f2

Please sign in to comment.