-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: GitHub Action->Docker Hub container builder(s) (#351)
* initial commit of Windows builder * fix job stage names * add Switch image builder * revert to old meson for now * unify image building scripts * fix typo
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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@v3 | ||
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.events.inputs.container_type }}-toolkit:${{ github.event.inputs.image_tag }} |