build-kit docker image #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-kit docker image | |
on: | |
workflow_dispatch: | |
inputs: | |
base-system: | |
type: choice | |
description: Base system type | |
default: 'alpine' | |
required: true | |
options: | |
- alpine | |
- debian | |
tag: | |
type: string | |
description: Image tag | |
default: 'latest' | |
jobs: | |
main: | |
name: Build and push | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup docker buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to ghcr.io | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
context: docker/images/build-kit | |
file: docker/images/build-kit/${{ inputs.base-system }}.Dockerfile | |
tags: ghcr.io/everest/build-kit-${{ inputs.base-system }}:${{ inputs.tag }} | |
push: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |