-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (50 loc) · 1.51 KB
/
build-container.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
name: Build and release container to registry
on:
push:
branches:
- main
env:
REGISTRY: ghcr.io
jobs:
build:
name: Build container image
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Configure Git
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Helm
uses: azure/setup-helm@v3
with:
version: v3.8.0
- name: Setup yq
uses: chrisdickinson/setup-yq@v1.0.1
with:
yq-version: v4.28.2
- name: Setup Nodejs and npm
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Setup yarn
run: npm install -g yarn
- name: Setup Nodejs with yarn caching
uses: actions/setup-node@v3
with:
node-version: '16'
cache: yarn
- name: Install dependencies
run: yarn
- name: Build and push UI image
run: |
yarn publish-pkgs -cp -r ${{ env.REGISTRY }} -o $(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')