Feat intune settings templates #2
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 go docs | |
on: | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- '.github/**/*' | |
- 'scripts/**/*' | |
workflow_dispatch: | |
permissions: | |
contents: write # Required to update documentation in the repo | |
pull-requests: write | |
jobs: | |
go-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4.2.2 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
# Creates provider documentation for godoc.org and pkg.go.dev | |
- name: Generate Go Docs | |
run: go generate ./... | |
- name: Check for changes in generated Go docs | |
id: go-gen-check | |
run: | | |
if [[ -n $(git status --porcelain) ]]; then | |
echo "changes=true" >> $GITHUB_OUTPUT | |
else | |
echo "changes=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Commit changes in Go docs | |
if: steps.go-gen-check.outputs.changes == 'true' | |
uses: stefanzweifel/git-auto-commit-action@v5.0.1 | |
with: | |
commit_message: "go generate: automated update" | |
file_pattern: '**/*.go' | |
commit_options: '--no-verify --signoff' | |
commit_user_name: "GitHub Actions Bot" | |
commit_user_email: "github-actions[bot]@users.noreply.github.com" | |
commit_author: "GitHub Actions Bot <github-actions[bot]@users.noreply.github.com>" | |
status_options: '--untracked-files=no' | |
add_options: '-u' | |
push_options: '--force' | |
skip_dirty_check: false | |
skip_fetch: true | |
skip_checkout: true |