-
Notifications
You must be signed in to change notification settings - Fork 16
60 lines (54 loc) · 1.99 KB
/
publish.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
# SPDX-License-Identifier: Apache-2.0
# name of the action
name: release
# trigger on push events with `v*` in tag
on:
push:
tags:
- 'v*'
# pipeline to execute
jobs:
release:
name: release tagged image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.elm
key: ${{ runner.os }}-elm-v3-${{ hashFiles('**/elm.json') }}
restore-keys: |
${{ runner.os }}-elm-v3-
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.npm
key: ${{ runner.os }}-npm-v2-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-v2-
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: node_modules
key: ${{ runner.os }}-modules-v2-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-modules-v2-
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version-file: '.nvmrc'
# ┌┐ ┬ ┬┬┬ ┌┬┐
# ├┴┐│ │││ ││
# └─┘└─┘┴┴─┘─┴┘
- name: install dependencies
run: npm ci --prefer-offline --no-audit
- name: run production build
run: npm run build:prod
# ┌┬┐┌─┐┌─┐┬┌─┌─┐┬─┐
# │││ ││ ├┴┐├┤ ├┬┘
# ─┴┘└─┘└─┘┴ ┴└─┘┴└─
- name: push to docker
uses: elgohr/Publish-Docker-Github-Action@eb53b3ec07136a6ebaed78d8135806da64f7c7e2 # v5
with:
name: target/vela-ui
cache: true
tag_names: true
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}