Add action.yaml
This commit is contained in:
commit
b3c7570134
1 changed files with 33 additions and 0 deletions
33
action.yaml
Normal file
33
action.yaml
Normal file
|
@ -0,0 +1,33 @@
|
|||
---
|
||||
|
||||
name: Kaniko
|
||||
description: Build a container image using Kaniko
|
||||
inputs:
|
||||
Dockerfile:
|
||||
description: The Dockerfile to pass to Kaniko
|
||||
required: true
|
||||
image:
|
||||
description: Name and tag under which to upload the image
|
||||
required: true
|
||||
registry:
|
||||
description: Domain of the registry. Should be the same as the first path component of the tag.
|
||||
required: true
|
||||
username:
|
||||
description: Username for the container registry
|
||||
required: true
|
||||
password:
|
||||
description: Password for the container registry
|
||||
required: true
|
||||
runs:
|
||||
using: docker
|
||||
image: docker://gcr.io/kaniko-project/executor:debug
|
||||
entrypoint: /bin/sh
|
||||
args:
|
||||
- -c
|
||||
- |
|
||||
mkdir -p /kaniko/.docker
|
||||
echo '{"auths":{"${{ inputs.registry }}":{"auth":"'$(printf "%s:%s" "${{ inputs.username }}" "${{ inputs.password }}" | base64 | tr -d '\n')'"}}}' > /kaniko/.docker/config.json
|
||||
cat > Dockerfile <<EOF
|
||||
${{ inputs.Dockerfile }}
|
||||
EOF
|
||||
/kaniko/executor --dockerfile Dockerfile --destination ${{ inputs.image }}
|
Loading…
Add table
Reference in a new issue