Skip to content

Avoid emitting empty string descriptions (#2119) #198

Avoid emitting empty string descriptions (#2119)

Avoid emitting empty string descriptions (#2119) #198

Workflow file for this run

name: Publish OCI Types Package
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
id-token: write
contents: read
jobs:
publish-oci-types-package:
name: Publish Types Package to OCI Registry
runs-on: ubuntu-latest
environment:
# sets the environment to 'prod' for push to main, and to 'test' for pull_requests
name: ${{ github.event_name == 'push' && 'prod' || 'test' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# Logging into Azure (publish-az-types.js dependency)
- name: Log in to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Install nbgv
id: nbgv
uses: dotnet/nbgv@master
- name: Generate tag for the package based on event type
id: generate_tag
run: |
if [ "${{ github.event_name }}" == "push" ]; then
echo "tag=${{ steps.nbgv.outputs.SimpleVersion }}" >> $GITHUB_OUTPUT
else
echo "tag=${{ steps.nbgv.outputs.SimpleVersion }}-pr${{ github.event.number }}" >> $GITHUB_OUTPUT
fi
- name: Intall Bicep CLI
env:
GH_TOKEN: ${{ github.token }}
# use the nightly build of the Bicep CLI to publish the resource types provider
run: bash <(curl -Ls https://aka.ms/bicep/nightly-cli.sh)
- name: Publish Azure Resource Types
id: publish-types
run: ~/.azure/bin/bicep publish-provider ./generated/index.json --target "br:${{ secrets.PUBLISH_REGISTRY_SERVER }}/bicep/providers/az:${{ steps.generate_tag.outputs.tag }}" --force