Compare commits
5 Commits
manifests
...
e16d98288b
| Author | SHA1 | Date | |
|---|---|---|---|
|
e16d98288b
|
|||
| 25710206d5 | |||
| c705885dda | |||
| 783d307998 | |||
| 06397c2b57 |
@@ -8,6 +8,8 @@ on:
|
||||
- "clusters/**"
|
||||
- ! "clusters/*/archive"
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
render-manifests-helm:
|
||||
runs-on: ubuntu-js
|
||||
@@ -31,15 +33,16 @@ jobs:
|
||||
CLUSTERS: cl01tl
|
||||
run: |
|
||||
for cluster in $CLUSTERS; do
|
||||
mkdir clusters/$CLUSTER/manifests
|
||||
mkdir clusters/$cluster/manifests
|
||||
|
||||
for chart_path in clusters/$CLUSTER/helm/; do
|
||||
chart_name=$(basename "$chart")
|
||||
for chart_path in clusters/$cluster/helm/*; do
|
||||
chart_name=$(basename "$chart_path")
|
||||
|
||||
echo "--- Rendering chart: $chart_name ---"
|
||||
echo ""
|
||||
echo "Rendering chart: $chart_name"
|
||||
|
||||
if [ -f "$chart_path/Chart.yaml" ]; then
|
||||
OUTPUT_FILE="clusters/$CLUSTER/manifests/$chart_name.yaml"
|
||||
OUTPUT_FILE="clusters/$cluster/manifests/$chart_name.yaml"
|
||||
|
||||
helm template "$chart_name" "$chart" --namespace "$chart_name" > "$OUTPUT_FILE"
|
||||
|
||||
@@ -51,11 +54,13 @@ jobs:
|
||||
done
|
||||
|
||||
- name: Create Pull Request
|
||||
id: pull-request
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
with:
|
||||
token: ${{ secrets.GITEA_TOKEN }}
|
||||
commit-message: "chore: Update manifests after chart change"
|
||||
branch: auto/update-manifests
|
||||
branch-suffix: timestamp
|
||||
base: manifests
|
||||
title: "Manifest Update: App Changes"
|
||||
body: |
|
||||
@@ -63,19 +68,22 @@ jobs:
|
||||
|
||||
* Triggered by workflow run ${{ github.run_id }}
|
||||
* Review the `files changed` tab for the full YAML diff.
|
||||
labels: |
|
||||
manifests
|
||||
automated
|
||||
add-paths: "clusters/*/rendered-manifests/"
|
||||
|
||||
- name: ntfy Success
|
||||
- name: ntfy Created
|
||||
uses: niniyas/ntfy-action@master
|
||||
if: success()
|
||||
if: steps.pull-request.outputs.pull-request-operation == 'created'
|
||||
with:
|
||||
url: "${{ secrets.NTFY_URL }}"
|
||||
topic: "${{ secrets.NTFY_TOPIC }}"
|
||||
title: "Manifest Render Success - Infrastructure"
|
||||
title: "Manifest Render PR Created - Infrastructure"
|
||||
priority: 3
|
||||
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
||||
tags: action,successfully,completed
|
||||
details: "Manifest rendering for Infrastructure has succeeded"
|
||||
details: "Manifest rendering for Infrastructure has created PR ${{ steps.pull-request.outputs.pull-request-number }}!"
|
||||
icon: "https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png"
|
||||
|
||||
- name: ntfy Failed
|
||||
|
||||
@@ -36,7 +36,7 @@ shelly-plug:
|
||||
main:
|
||||
image:
|
||||
repository: php
|
||||
tag: 8.4.15-apache-bookworm
|
||||
tag: 8.5.0-apache-bookworm
|
||||
pullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: SHELLY_HOSTNAME
|
||||
|
||||
Reference in New Issue
Block a user