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: true12+
type: string713
814
jobs:15+
generate-schema-latest:16+
if: ${{ github.event_name == 'release' }}17+
runs-on: ubuntu-latest18+
container:19+
# I hate gha, Because I can't pass variables to image tag with string manipulation.20+
image: ghcr.io/${{ github.repository }}:latest21+
steps:22+
- name: generate schema23+
run: helmwave schema > schema.json24+
25+
- name: upload artifact26+
uses: actions/upload-artifact@v427+
with:28+
name: schema.json29+
path: schema.json30+
931
generate-schema:32+
if: ${{ github.event_name == 'workflow_dispatch' }}1033
runs-on: ubuntu-latest1134
container:1235
# I hate gha, Because I can't pass variables to image tag with string manipulation.13-
image: ghcr.io/${{ github.repository }}:latest36+
image: ${{ format('ghcr.io/${0}:v${1}', github.repository, github.event.inputs.tag) }}1437
steps:1538
- name: generate schema1639
run: helmwave schema > schema.json@@ -36,7 +59,16 @@
3659
name: schema.json3760
3861
- name: upload to release62+
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.json67+
68+
- name: manual upload to release69+
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.json74+