Build CI Container #7
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 CI Container | |
on: | |
workflow_dispatch: | |
inputs: | |
custom_ref: | |
required: false | |
description: "Commit ref that contains the Dockerfile you want to use (if left blank: master HEAD)" | |
container_type: | |
type: choice | |
description: "Container type to build" | |
options: | |
- windows | |
- switch | |
- linux | |
image_tag: | |
required: true | |
description: "Container tag to push (usually the date: YYYYMMDD)" | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.custom_ref }} | |
- name: Login to Docker Hub Registry | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build/Push Docker image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: misc/ci/Dockerfile.${{ github.event.inputs.container_type }} | |
push: true | |
tags: taiseiproject/${{ github.event.inputs.container_type }}-toolkit:${{ github.event.inputs.image_tag }} |