New ๐ŸŒŠ wave for @helm

Commit 769bf902

769bf902d5fbMerged

Dmitrii Zhiliaev <[email protected]> ยท 1 year ago ยท 1 file ยท ~1 modified

Description

Update json-schema.yml

Details

Commit
769bf902d5fb
Parent
467dfd510f7b

.github/workflows/json-schema.ymlmodifiedView file

@@ -3,14 +3,37 @@
33 on:
44 release:
55 types: [ published ]
6+
67 workflow_dispatch:
8+ inputs:
9+ tag:
10+ description: 'helmwave tag'
11+ required: true
12+ type: string
713
814 jobs:
15+ generate-schema-latest:
16+ if: ${{ github.event_name == 'release' }}
17+ runs-on: ubuntu-latest
18+ container:
19+ # I hate gha, Because I can't pass variables to image tag with string manipulation.
20+ image: ghcr.io/${{ github.repository }}:latest
21+ steps:
22+ - name: generate schema
23+ run: helmwave schema > schema.json
24+
25+ - name: upload artifact
26+ uses: actions/upload-artifact@v4
27+ with:
28+ name: schema.json
29+ path: schema.json
30+
931 generate-schema:
32+ if: ${{ github.event_name == 'workflow_dispatch' }}
1033 runs-on: ubuntu-latest
1134 container:
1235 # I hate gha, Because I can't pass variables to image tag with string manipulation.
13- image: ghcr.io/${{ github.repository }}:latest
36+ image: ${{ format('ghcr.io/${0}:v${1}', github.repository, github.event.inputs.tag) }}
1437 steps:
1538 - name: generate schema
1639 run: helmwave schema > schema.json
@@ -36,7 +59,16 @@
3659 name: schema.json
3760
3861 - name: upload to release
62+ if: ${{ github.event_name == 'release' }}
63+ env:
64+ GH_TOKEN: ${{ github.token }}
65+ TAG: ${{ github.event.release.tag_name }}
3966 run: gh release upload $TAG schema.json
67+
68+ - name: manual upload to release
69+ if: ${{ github.event_name == 'workflow_dispatch' }}
4070 env:
4171 GH_TOKEN: ${{ github.token }}
42- TAG: ${{ github.event.release.tag_name }}
72+ TAG: ${{ github.event.inputs.tag }}
73+ run: gh release upload $TAG schema.json
74+