-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (57 loc) · 1.85 KB
/
merge-main.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
name: semantic release
on:
push:
branches: [main]
paths-ignore:
- '*.md'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
vars:
name: Set Variables
runs-on: ubuntu-24.04
timeout-minutes: 1
steps:
# Get PR number for squash merges to main
- name: PR Number
id: pr
uses: bcgov/[email protected]
- name: Metabase Version
id: metabase_version
run: |
appVersion=$(yq '.metabase.metabaseImage.tag' charts/nr-metabase/values.yaml)
echo "app version is $appVersion"
echo "app_version=$appVersion" >> "$GITHUB_OUTPUT"
- uses: shrink/actions-docker-registry-tag@v4
with:
registry: ghcr.io
repository: ${{ github.repository }}/metabase
target: ${{ steps.pr.outputs.pr }}
tags: |
${{ steps.metabase_version.outputs.app_version }}
helm-release:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: package helm chart
shell: bash
run: |
APP_VERSION=$(yq '.metabase.metabaseImage.tag' charts/nr-metabase/values.yaml)
# remove v from version as it only needs the numbers without v
VERSION=$(echo $APP_VERSION | sed 's/v//')
helm package -u --destination=.cr-release-packages --app-version="$APP_VERSION" --version=$VERSION charts/${{ github.event.repository.name }}
- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
skip_packaging: 'true'