Skip to content

Docker Image CI for Ubuntu #19

Docker Image CI for Ubuntu

Docker Image CI for Ubuntu #19

Workflow file for this run

name: Docker Image CI for Ubuntu
on:
workflow_dispatch:
inputs:
version:
description: 'ubuntu version'
required: true
default: 'all'
type: choice
options:
- 'all'
- '18.04'
- '20.04'
- '22.04'
- '24.04'
jobs:
build_and_push:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- UBUNTU_VERSION: '18.04'
- UBUNTU_VERSION: '20.04'
- UBUNTU_VERSION: '22.04'
- UBUNTU_VERSION: '24.04'
env:
UBUNTU_VERSION: ${{ matrix.UBUNTU_VERSION }}
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.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Aliyun Docker Registry
uses: docker/login-action@v3
with:
registry: registry.cn-hongkong.aliyuncs.com
username: ${{ secrets.ALIYUN_USERNAME }}
password: ${{ secrets.ALIYUN_PASSWORD }}
- name: Build and Push
if: (github.event.inputs.version == 'all' || github.event.inputs.version == matrix.UBUNTU_VERSION)
uses: docker/build-push-action@v5
with:
context: ubuntu-desktop
file: ubuntu-desktop/${{env.UBUNTU_VERSION}}/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
gezp/ubuntu-desktop:${{env.UBUNTU_VERSION}}
registry.cn-hongkong.aliyuncs.com/gezp/ubuntu-desktop:${{env.UBUNTU_VERSION}}