Docker Image CI #4
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: Docker Image CI | |
on: | |
workflow_dispatch: | |
inputs: | |
path: | |
description: 'Path to Dockerfile' | |
required: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: ${{ inputs.path != '' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build the Docker image | |
run: | | |
docker build ${{ inputs.path }} -t cuteribs/${{ inputs.path }}:latest | |
docker push cuteribs/${{ inputs.path }}:latest |