Skip to content

build-docker-image

build-docker-image #4

name: build-docker-image
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag for Docker image'
required: true
ref:
description: 'Branch, tag, or commit SHA to build from'
required: true
default: main
jobs:
build-and-push:
runs-on: ubuntu-latest
timeout-minutes: 300
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.ref }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Log in to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: sekmenhuseyin/generate-pull-request-description:${{ github.event.inputs.tag }}