Build Docker image manually #74
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 Docker image manually | |
on: | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: 'Tag for image' | |
default: 'dev' | |
required: true | |
image: | |
description: 'Image to build' | |
default: 'ptero-alpine-wine' | |
required: true | |
jobs: | |
build: | |
name: "Build ${{ github.event.inputs.image }}:${{ github.event.inputs.branch }}" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses : docker/setup-buildx-action@v1 | |
with: | |
version: "v0.5.1" | |
buildkitd-flags: --debug | |
- uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: docker/build-push-action@v2 | |
with: | |
context: ./images/${{ github.event.inputs.image }} | |
file: ./images/${{ github.event.inputs.image }}/Dockerfile | |
platforms: linux/amd64 | |
push: true | |
tags: | | |
ghcr.io/stefanuk12/${{ github.event.inputs.image }}:${{ github.event.inputs.branch }} |