-
Notifications
You must be signed in to change notification settings - Fork 107
41 lines (37 loc) · 1.14 KB
/
build-ci-container.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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 }}