Skip to content

Build Docker Image

Build Docker Image #53

name: Build Docker Image
on:
schedule:
- cron: "0 2 * * 0" # run at 2 AM UTC on Sundays
workflow_dispatch:
inputs:
logLevel:
description: "Log level"
required: true
default: "warning"
type: choice
options:
- info
- warning
- debug
jobs:
build_docker:
runs-on: [self-hosted, ubuntu]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PUSH }}
# https://github.com/docker/build-push-action
- name: Build and push Ubuntu-Runner
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
file: ./.docker/gha_runners/ubuntu
tags: henriqueslab/nanopyx-gha-runner-ubuntu:latest
#cache-from: type=local,src=/tmp/.buildx-cache
#cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max