This repository has been archived by the owner on Jan 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
66 lines (60 loc) · 1.88 KB
/
client.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
name: pyrog-client
on:
push:
paths:
- "client/**"
- ".github/**"
jobs:
build:
name: Build Pyrog client
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
- uses: actions/cache@v1
with:
path: client/node_modules
key: ${{ runner.os }}-${{ hashFiles('client/yarn.lock') }}
- run: yarn --cwd ./client install
- run: yarn --cwd ./client build
# Some cleaning need to be done, see Issue #105
# - run: yarn --cwd ./client lint
publish:
needs: build
runs-on: ubuntu-18.04
steps:
- id: docker_meta
name: Docker meta
uses: crazy-max/ghaction-docker-meta@v1
# compute tags:
# - always tag with a short commit SHA : (arkhn/image:sha-${GITHUB_SHA::7})
# - always tag with the branch same (replacing '/' with '-')
# - when a tag follows semver (eg: v1.2.3), tag with 'latest' and '1.2.3'
with:
images: arkhn/pyrog-client
tag-sha: true
tag-semver: |
{{version}}
- uses: actions/checkout@v2
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
with:
driver-opts: network=host
- uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_LOGIN }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: docker/build-push-action@v2
with:
context: client
file: ./client/Dockerfile
build-args: |
VERSION_NAME=${{ steps.docker_meta.outputs.version }}
VERSION_SHA=${GITHUB_SHA::8}
platforms: linux/amd64
# always push images to the hub
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}