This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate Kubernetes Manifest | |
on: | |
push: | |
paths: | |
- 'bicep/**' | |
workflow_dispatch: | |
env: | |
BICEP_FILE: ./bicep/radius-app.bicep | |
jobs: | |
generate-manifest: | |
permissions: | |
pull-requests: write | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: oras-project/setup-oras@v1 | |
- name: Download Radius CLI | |
run: | | |
wget -q "https://raw.githubusercontent.com/willdavsmith/radius/flux-demo/deploy/install.sh" -O - | /bin/bash -s edge | |
- name: Generate Kubernetes Manifest | |
run: | | |
rad bicep generate-kubernetes-manifest ${{ env.BICEP_FILE }} --outfile ./apps/base/radius-app/radius-app.yaml -p namespace=radius-app | |
- name: Generate commit metadata | |
id: generate-commit-metadata | |
run: | | |
echo "RUN_IDENTIFIER=$(date +%Y%m%d%H%M%S)" >> $GITHUB_OUTPUT | |
- name: Create a PR to update the Kubernetes manifest | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
branch: "update-kubernetes-manifest-${{ steps.generate-commit-metadata.outputs.RUN_IDENTIFIER }}" | |
commit-message: "Update Kubernetes manifest ${{ steps.generate-commit-metadata.outputs.RUN_IDENTIFIER }}" | |
title: "Update Kubernetes manifest ${{ steps.generate-commit-metadata.outputs.RUN_IDENTIFIER }}" | |
body: | | |
This PR updates the Kubernetes manifest. | |
base: main | |