Skip to content

Commit

Permalink
Change version handling (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus authored Oct 23, 2020
1 parent 6a52952 commit d9b9df8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ You can use this repository as a GitHub action to test and/or publish your build

Use the `with.args` key to pass in arguments to the builder, to see what arguments are supported you can run the [help](#help) or look in the [builder.sh file](./builder.sh)

To spesify a version of the runner you want to use, set the `with.version` key, this defaults to `dev`.

### Test action example

```yaml
Expand Down
18 changes: 12 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,31 @@ inputs:
description: 'Arguments passed to the builder'
required: true
default: '--help'
version:
description: 'The version of the builder'
required: false
default: 'dev'
runs:
using: "composite"
steps:
- shell: bash
id: version
run: |
input=$(echo "${{ github.action_path }}" | cut -d"/" -f8 )
if [[ "${input}" == "master" ]] || [[ -z "${input}" ]]; then
input="latest"
fi
echo "::set-output name=version::${input}"
- shell: bash
id: build
run: |
docker run --rm --privileged \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v ~/.docker:/root/.docker \
-v ${{ github.workspace }}:/data \
homeassistant/amd64-builder:${{ inputs.version }} \
homeassistant/amd64-builder:${{ steps.version.outputs.version }} \
${{ inputs.args }}
- shell: bash
id: verify
run: docker images
branding:
icon: 'home'
color: 'blue'
color: 'blue'

0 comments on commit d9b9df8

Please sign in to comment.