-
Notifications
You must be signed in to change notification settings - Fork 146
56 lines (56 loc) · 1.52 KB
/
docker.yaml
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 Build
on:
push:
tags:
- v*
workflow_dispatch:
jobs:
buildx:
runs-on: ubuntu-latest
steps:
- name: Get Tag
id: tag
run: echo ::set-output name=VER::${GITHUB_REF/refs\/tags\//}
- name: Get core
uses: actions/checkout@v3
with:
ref: master
- name: Get Frontend
uses: actions/checkout@v3
with:
repository: iyear/pure-live-frontend
ref: master
path: frontend
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: frontend/yarn.lock
- name: Install and Build Frontend
run: |
cd frontend
yarn
yarn run build
cp -r dist ../static
cd .. && rm -rf frontend
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Tree
run: tree -I '*svn|*node_module*'
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/386
push: true
tags: |
iyear/pure-live:latest
iyear/pure-live:${{ steps.tag.outputs.VER }}