Skip to content

Build(deps): Bump github.com/microsoftgraph/msgraph-beta-sdk-go from … #491

Build(deps): Bump github.com/microsoftgraph/msgraph-beta-sdk-go from …

Build(deps): Bump github.com/microsoftgraph/msgraph-beta-sdk-go from … #491

Workflow file for this run

name: Generate Docs
on:
schedule:
# Run nightly at 3 AM UTC (after tests complete)
- cron: '0 3 * * *'
push:
branches:
- main
paths-ignore:
- '.github/**/*'
- 'scripts/**/*'
- './.golangci.yml'
workflow_dispatch:
permissions:
contents: write # Required to update documentation in the repo
pull-requests: write
jobs:
provider-docs:
name: '📚 Generate Go and TF Provider Docs'
runs-on: ubuntu-24.04-arm
steps:
- name: Harden Runner
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
with:
egress-policy: audit
- name: Check Out
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
cache: true
go-version-file: 'go.mod'
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # 3.1.2
with:
terraform_version: '1.12.1'
terraform_wrapper: true
# Creates provider documentation for godoc.org and pkg.go.dev
- name: 'go generate'
run: go generate ./...
# Format all Terraform files
- name: Format Terraform files
run: |
find . -type f -name "*.tf" -exec terraform fmt {} \;
# Creates provider documentation for Terraform
- name: Generate tf docs
run: |
go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
cd $GITHUB_WORKSPACE
tfplugindocs generate --provider-name terraform-provider-microsoft365 --rendered-provider-name "Microsoft 365"
- name: Check for changes in generated Go docs and formatted Terraform files
id: go-gen-check
run: |
if [[ -n $(git status --porcelain) ]]; then
echo "changes=true" >> $GITHUB_OUTPUT
else
echo "changes=false" >> $GITHUB_OUTPUT
fi
- name: Create Pull Request with documentation updates
if: steps.go-gen-check.outputs.changes == 'true'
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
with:
commit-message: "chore: update go documentation, provider documentation and format terraform files"
title: "📚 Auto-update documentation and format Terraform files"
body: "Automated documentation update and Terraform file formatting."
branch: docs/auto-update-${{ github.run_number }}
delete-branch: true