Skip to content

Commit

Permalink
Generate YAML snippets from release (#1072)
Browse files Browse the repository at this point in the history
  • Loading branch information
paoloredis authored Jan 22, 2025
1 parent fc3905b commit 4ce749d
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/k8s_apis_sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,41 @@ jobs:
sed -E -i 's/\[index\]/\[\]/g' artifacts/redis_enterprise_remote_cluster_api.md
awk '/(#[^")]+)index/ {gsub(/index/,"")}; {print}' artifacts/redis_enterprise_remote_cluster_api.md > _tmp.md && mv _tmp.md artifacts/redis_enterprise_remote_cluster_api.md
- name: 'Generate YAML snippets'
run: |-
function formatYamlSnippet() {
cat > "$2" << EOL
\`\`\`yaml
$(cat $1)
\`\`\`
EOL
}
formatYamlSnippet admission-service.yaml content/embeds/admission-service.md
formatYamlSnippet admission/webhook.yaml content/embeds/admission_webhook.md
formatYamlSnippet examples/v1/rec.yaml content/embeds/rec.md
formatYamlSnippet examples/v1alpha1/reaadb.yaml content/embeds/reaadb.md
formatYamlSnippet examples/v1alpha1/redb.yaml content/embeds/redb.md
formatYamlSnippet examples/v1alpha1/rerc.yaml content/embeds/rerc.md
formatYamlSnippet log_collector/log_collector_role_all_mode.yaml content/embeds/log_collector_role_all_mode.md
formatYamlSnippet log_collector/log_collector_role_restricted_mode.yaml content/embeds/log_collector_role_restricted_mode.md
formatYamlSnippet multi-namespace-redb/operator_cluster_role_binding.yaml content/embeds/multi-ns_operator_cluster_role_binding.md
formatYamlSnippet multi-namespace-redb/operator_cluster_role.yaml content/embeds/multi-ns_operator_cluster_role.md
formatYamlSnippet multi-namespace-redb/role_binding.yaml content/embeds/multi-ns_role_binding.md
formatYamlSnippet multi-namespace-redb/role.yaml content/embeds/multi-ns_role.md
formatYamlSnippet openshift/admission-service.yaml content/embeds/openshift_admission-service.md
formatYamlSnippet openshift/rec_rhel.yaml content/embeds/openshift_rec.md
formatYamlSnippet openshift/role_binding.yaml content/embeds/openshift_role_binding.md
formatYamlSnippet openshift/role.yaml content/embeds/openshift_role.md
formatYamlSnippet openshift/scc.yaml content/embeds/openshift_scc.md
formatYamlSnippet openshift/service_account.yaml content/embeds/openshift_service_account.md
formatYamlSnippet rack_awareness/rack_aware_cluster_role_binding.yaml content/embeds/rack_aware_cluster_role_binding.md
formatYamlSnippet rack_awareness/rack_aware_cluster_role.yaml content/embeds/rack_aware_cluster_role.md
formatYamlSnippet rack_awareness/rack_aware_rec.yaml content/embeds/rack_aware_rec.md
formatYamlSnippet role_binding.yaml content/embeds/role_binding.md
formatYamlSnippet role.yaml content/embeds/role.md
formatYamlSnippet service_account.yaml content/embeds/service_account.md
- name: 'Send pull request'
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
Expand All @@ -101,6 +136,8 @@ jobs:
git apply content/operate/kubernetes/reference/kubernetes-api-reference-frontmatter.patch
git add content/operate/kubernetes/reference/
git add content/embeds/
git commit -m "k8s api docs ${RELEASE}"
git push origin "${BRANCH}"
Expand Down

0 comments on commit 4ce749d

Please sign in to comment.