new file: .gitea/actions/buildkit_build_push.yaml
Some checks failed
/ build-image (push) Failing after 15s
Some checks failed
/ build-image (push) Failing after 15s
modified: .gitea/workflows/ docker-image.deploy.yml
This commit is contained in:
50
.gitea/actions/buildkit_build_push.yaml
Normal file
50
.gitea/actions/buildkit_build_push.yaml
Normal file
@@ -0,0 +1,50 @@
|
||||
name: BuildKit Build and Deploys
|
||||
description: "Build and deploy images"
|
||||
|
||||
inputs:
|
||||
registry_addr:
|
||||
description: ""
|
||||
required: true
|
||||
registry_username:
|
||||
description: ""
|
||||
required: true
|
||||
registry_password:
|
||||
registry_description: ""
|
||||
required: true
|
||||
buildkit_addr:
|
||||
description: ""
|
||||
required: true
|
||||
default: "false"
|
||||
name:
|
||||
description: ""
|
||||
required: true
|
||||
default: "false"
|
||||
context:
|
||||
description: ""
|
||||
required: true
|
||||
default: "false"
|
||||
dokerfile:
|
||||
description: ""
|
||||
required: true
|
||||
default: "false"
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Create kubeconfig
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
- name: Authenticate to Gitea registry
|
||||
run: |
|
||||
mkdir -p ~/.docker
|
||||
AUTH=$(printf "%s" "${{ inputs.registry_username }}:${{ inputs.registry_password }}" | base64 -w 0)
|
||||
printf '{"auths":{"${{ inputs.registry_addr }}":{"auth":"%s"}}}' "$AUTH" > ~/.docker/config.json
|
||||
|
||||
buildctl \
|
||||
--addr ${{ inputs.buildkit_addr }} \
|
||||
build \
|
||||
--frontend=dockerfile.v0 \
|
||||
--local context=${{ inputs.context }} \
|
||||
--local dockerfile=${{ inputs.dockerfile }} \
|
||||
--opt filename=Dockerfile \
|
||||
--output type=image,name=${{ inputs.tags }},push=true
|
||||
Reference in New Issue
Block a user