Update apiversion to 2023-10-01-preview #1118
Workflow file for this run
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
# ------------------------------------------------------------ | |
# Copyright 2023 The Radius Authors. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
# ------------------------------------------------------------ | |
name: Update extensibility provider types | |
on: | |
pull_request: | |
paths: | |
- "hack/bicep-types-radius/generated/**" | |
jobs: | |
update-types: | |
name: Update Bicep extensibility provider types | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
env: | |
GOVER: '^1.21' | |
GOPROXY: https://proxy.golang.org | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go ${{ env.GOVER }} | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GOVER }} | |
- name: Setup npm | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Install TypeSpec compiler | |
run: | | |
pushd typespec | |
npm ci | |
popd | |
- name: Install autorest | |
run: npm install -g [email protected] | |
- name: Install oav | |
run: npm install -g [email protected] | |
- name: Install mockgen | |
run: go install github.com/golang/mock/[email protected] | |
- name: Install controller-gen | |
run: go install sigs.k8s.io/controller-tools/cmd/[email protected] | |
- name: Setup Azure CLI | |
run: curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash | |
- name: Run make generate | |
run: make generate | |
- name: Check if generated code is up to date | |
continue-on-error: true | |
id: gitdiff | |
run: | | |
git diff --exit-code | |
- name: Check git diff failures | |
if: steps.gitdiff.outcome != 'success' | |
run: | | |
echo "Generated code is not up to date, run 'make generate' to update generated code." | |
exit 1 | |
- id: get_radius_commit_hash | |
name: Get commit hash (radius-project/radius) | |
run: | | |
echo "commit_hash_short=$(git rev-parse HEAD --short)" >> $GITHUB_OUTPUT | |
echo "gh_uri=https://github.com/radius-project/radius/tree/$(git rev-parse HEAD)/hack/bicep-types-radius/generated" >> $GITHUB_OUTPUT | |
- name: Clone https://github.com/radius-project/bicep | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GH_RAD_CI_BOT_PAT }} | |
repository: radius-project/bicep | |
path: workflow-temp/bicep | |
ref: bicep-extensibility | |
- name: Copy generated files to radius-project/bicep repo | |
run: | | |
mkdir -p workflow-temp/bicep/src/Bicep.Types.Radius/generated | |
cp -R hack/bicep-types-radius/generated/* workflow-temp/bicep/src/Bicep.Types.Radius/generated | |
- name: Create Pull Request in radius-project/bicep repo | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
path: workflow-temp/bicep | |
token: ${{ secrets.GH_RAD_CI_BOT_PAT }} | |
committer: rad-ci-bot <[email protected]> | |
author: rad-ci-bot <[email protected]> | |
signoff: false | |
branch: radius-types/patch-${{ github.event.pull_request.number }} | |
delete-branch: true | |
title: | | |
Update Radius extensibility provider for Bicep | |
body: | | |
## Autogenerated Report | |
- Updates Bicep extensibility type definitions generated from [radius-project/radius](${{ steps.get_radius_commit_hash.outputs.gh_uri }}) | |
commit-message: | | |
update generated types from ${{ steps.get_radius_commit_hash.outputs.gh_uri }} | |
labels: | | |
autogenerated | |
github_actions | |
radius-types | |
draft: false |