-
Notifications
You must be signed in to change notification settings - Fork 261
78 lines (65 loc) · 2.03 KB
/
build-extension-catalog.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
72
73
74
75
76
77
78
name: Build and release Extension Catalog Image to registry
on:
workflow_call:
inputs:
registry_target:
required: true
type: string
registry_user:
required: true
type: string
tagged_release:
required: false
type: string
secrets:
registry_token:
required: true
jobs:
build-extension-catalog:
name: Build container image
if: github.ref_type == 'tag' || (github.ref == 'refs/heads/main' && github.event_name != 'pull_request')
runs-on: ubuntu-latest
permissions:
actions: write
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Enable Corepack
run: corepack enable
- name: Configure Git
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ${{ inputs.registry_target }}
username: ${{ inputs.registry_user }}
password: ${{ secrets.registry_token }}
- name: Setup Helm
uses: azure/setup-helm@v3
with:
version: v3.8.0
- name: Setup Nodejs with yarn caching
uses: actions/setup-node@v4
with:
node-version: '20'
cache: yarn
- name: Install dependencies
run: yarn
- name: Parse Extension Name
if: github.ref_type == 'tag'
id: parsed-name
env:
GH_TOKEN: ${{ github.token }}
run: |
yarn parse-tag-name ${{ inputs.tagged_release }} ${{ github.run_id }} "catalog"
- name: Build and push UI image
run: |
publish="yarn publish-pkgs -cp -r ${{ inputs.registry_target }} -o ${{ github.repository_owner }}"
if [[ -n "${{ inputs.tagged_release }}" ]]; then
publish="$publish -t ${{ inputs.tagged_release }}"
fi
$publish