Skip to content

chore(deps): bump the github-actions group with 2 updates #113

chore(deps): bump the github-actions group with 2 updates

chore(deps): bump the github-actions group with 2 updates #113

Workflow file for this run

# Auto-generate documentation and commit changes to PRs
name: Docs
on:
pull_request:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
generate:
name: Generate and commit
runs-on: ubuntu-latest
# Only run on PRs from the same repo (not forks) to allow pushing
if: github.event.pull_request.head.repo.full_name == github.repository
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: 'go.mod'
cache: true
- uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4.0.1
with:
terraform_wrapper: false
- name: Run make generate
run: make generate
- name: Check for changes
id: changes
run: |
if [[ -n "$(git status --porcelain)" ]]; then
echo "has_changes=true" >> $GITHUB_OUTPUT
else
echo "has_changes=false" >> $GITHUB_OUTPUT
fi
- name: Commit and push changes
if: steps.changes.outputs.has_changes == 'true'
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m "chore: auto-generate documentation
This commit was automatically generated by the CI pipeline.
Run 'make generate' locally to regenerate documentation."
git push