Docker build and publish #2
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 build and publish | |
on: | |
workflow_dispatch: | |
inputs: | |
publish_tag: | |
description: 'Docker image version' | |
required: true | |
default: 'v4.1' | |
ndk_version: | |
description: 'OpenHarmony ndk version' | |
required: true | |
default: '4.1' | |
jobs: | |
build-debian-base-image: | |
name: Build debian image | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: docker.io | |
username: ${{ secrets.DOCKERHUB_NAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push debian | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ./zig.Dockerfile | |
build-args: | | |
CI_NDK_VERSION=${{ inputs.ndk_version }} | |
platforms: linux/amd64 | |
push: true | |
tags: docker.io/southorange/ohos-base-zig:${{ inputs.publish_tag }} |