secured-remote-docker-build/action.yml
Lukas Schaefer 7aeef62a39
Implement auth for git repo
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
2026-09-03 21:16:26 -04:00

58 lines
1.9 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: Trigger BuildKit build
description: POST a git-commit build to a docker-build-container service and fail the job on HTTP or build errors.
author: lukasdotcom
inputs:
url:
description: Build service POST URL (e.g. https://buildkit.example/build)
required: true
token:
description: Build JWT (minted with scripts/mint_token.py)
required: true
commit:
description: Git commit SHA to build (740 hex). Required unless files are set.
required: false
default: ""
tags:
description: Image refs to build and push (newline- or comma-separated)
required: true
files:
description: Newline-separated files to upload (multipart). Each path is both the local file and the context path. JWT must include a matching files claim.
required: false
default: ""
remote:
description: Registry host for docker image (omit for Docker Hub default on the server)
required: false
default: ""
username:
description: Registry username
required: true
password:
description: Registry password
required: true
repo_username:
description: Optional git username for private repo clone (with repo_password)
required: false
default: ""
repo_password:
description: Optional git password or token for private repo clone (with repo_username)
required: false
default: ""
runs:
using: composite
steps:
- name: Trigger buildkit build
shell: bash
env:
BUILDKIT_URL: ${{ inputs.url }}
BUILDKIT_TOKEN: ${{ inputs.token }}
COMMIT: ${{ inputs.commit }}
TAGS: ${{ inputs.tags }}
FILES: ${{ inputs.files }}
REMOTE: ${{ inputs.remote }}
USERNAME: ${{ inputs.username }}
PASSWORD: ${{ inputs.password }}
REPO_USERNAME: ${{ inputs.repo_username }}
REPO_PASSWORD: ${{ inputs.repo_password }}
run: bash "${{ github.action_path }}/scripts/trigger_build.sh"