Skip to content

Build and Push Docker Image #1

Build and Push Docker Image

Build and Push Docker Image #1

name: Build and Push Docker Image
on:
workflow_dispatch:
inputs:
tag:
description: 'Docker image tag'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/icarus-verilog:${{ github.event.inputs.tag }}