forked from dushixiang/next-terminal
-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (68 loc) · 2.52 KB
/
docker-next-terminal.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Docker next-terminal Build
on:
workflow_dispatch:
push:
tags:
- "v*"
jobs:
DOCKERHUB_next-terminal_Build:
name: Docker next-terminal Build
runs-on: ubuntu-latest
steps:
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Private Actions Checkout
uses: actions/[email protected]
- name: Docker Setup QEMU
uses: docker/[email protected]
- name: Docker Setup Buildx
uses: docker/[email protected]
- name: node Setup
uses: actions/setup-node@v2
with:
node-version: '16'
- name: npm install
run: |
cd web
npm install --global yarn
yarn
yarn build
- name: Docker Login
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Docker Aliyun Login
uses: docker/[email protected]
with:
registry: registry.cn-beijing.aliyuncs.com
username: ${{ secrets.ALI_USERNAME }}
password: ${{ secrets.ALI_PASSWORD }}
- name: Build and push Docker images
uses: docker/[email protected]
with:
context: .
platforms: linux/arm64,linux/arm/v7,linux/amd64
file: Dockerfile
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/next-terminal:latest
${{ secrets.DOCKERHUB_USERNAME }}/next-terminal:${{ steps.get_version.outputs.VERSION }}
registry.cn-beijing.aliyuncs.com/${{ secrets.DOCKERHUB_USERNAME }}/next-terminal:latest
registry.cn-beijing.aliyuncs.com/${{ secrets.DOCKERHUB_USERNAME }}/next-terminal:${{ steps.get_version.outputs.VERSION }}
cache-from: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/next-terminal:cache
cache-to: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/next-terminal:cache,mode=max
DOCKERHUB_Hub_Description:
needs: [ DOCKERHUB_next-terminal_Build ]
name: Change DockerHub Description
runs-on: ubuntu-latest
steps:
- name: Private Actions Checkout
uses: actions/[email protected]
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: ${{ secrets.DOCKERHUB_USERNAME }}/next-terminal