-
Notifications
You must be signed in to change notification settings - Fork 77
56 lines (54 loc) · 1.63 KB
/
ubuntu.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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'
jobs:
build_and_push:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- UBUNTU_VERSION: '18.04'
- UBUNTU_VERSION: '20.04'
- UBUNTU_VERSION: '22.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}}