-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (43 loc) · 1.39 KB
/
deploy-example.yml
File metadata and controls
45 lines (43 loc) · 1.39 KB
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
name: Deploy Example (consume publish outputs)
on:
workflow_dispatch:
inputs:
image:
description: "Image tag (from publish outputs)"
required: false
chart:
description: "Chart ref (from publish outputs)"
required: false
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set defaults
id: meta
env:
INPUT_IMAGE: ${{ inputs.image }}
INPUT_CHART: ${{ inputs.chart }}
OWNER: ${{ github.repository_owner }}
run: |
IMAGE="${INPUT_IMAGE:-ghcr.io/${OWNER}/ocpa:latest}"
CHART="${INPUT_CHART:-oci://ghcr.io/${OWNER}/ocpa-chart}"
echo "image=$IMAGE" >> "$GITHUB_OUTPUT"
echo "chart=$CHART" >> "$GITHUB_OUTPUT"
- name: Install Helm
run: |
sudo apt-get update && sudo apt-get install -y helm
- name: Helm show values (for info)
env:
CHART: ${{ steps.meta.outputs.chart }}
run: |
helm show values "$CHART"
# Example deploy command (adjust namespace/values as needed)
- name: Helm upgrade/install
env:
IMAGE: ${{ steps.meta.outputs.image }}
CHART: ${{ steps.meta.outputs.chart }}
run: |
helm upgrade --install ocpa "$CHART" \
--namespace ocpa --create-namespace \
--set api.image="$IMAGE"