Initial commit
This commit is contained in:
commit
2088faeaa6
6
Dockerfile
Normal file
6
Dockerfile
Normal file
|
@ -0,0 +1,6 @@
|
|||
FROM gcr.io/kaniko-project/executor:debug
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
5
README.md
Normal file
5
README.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
# runner-action-kaniko
|
||||
|
||||
Used to build container image from Dockerfile with kaniko. Using kaniko means
|
||||
we do not need to make the outer docker daemon available to the inner runner
|
||||
containers.
|
14
action.yml
Normal file
14
action.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
inputs:
|
||||
credential:
|
||||
description: 'a string containing username and password: username:password'
|
||||
required: true
|
||||
registry:
|
||||
description: 'the name of the registry'
|
||||
required: true
|
||||
default: 'platform.sunet.se'
|
||||
image:
|
||||
description: 'name of the image: org-name/container-name:latest'
|
||||
required: true
|
||||
runs:
|
||||
using: docker
|
||||
image: Dockerfile
|
7
entrypoint.sh
Normal file
7
entrypoint.sh
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Setup auth
|
||||
echo '{"auths":{"'"$(printf "%s" "$INPUT_REGISTRY")"'":{"auth":"'"$(printf "%s" "$INPUT_CREDENTIAL" | base64 | tr -d '\n')"'"}}}' > /kaniko/.docker/config.json
|
||||
|
||||
# Build container
|
||||
/kaniko/executor --dockerfile Dockerfile --destination "$INPUT_REGISTRY/$INPUT_IMAGE"
|
Loading…
Reference in a new issue