Skip to content

[cherry-pick] Update from nginxinc to nginx #150

[cherry-pick] Update from nginxinc to nginx

[cherry-pick] Update from nginxinc to nginx #150

Workflow file for this run

name: Run hugo commands on Dependabot PRs
on:
pull_request:
paths:
- "site/go.mod"
merge_group:
permissions:
contents: read
defaults:
run:
shell: bash
jobs:
build:
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
runs-on: ubuntu-24.04
permissions:
contents: write
pull-requests: read
steps:
- name: Fetch Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@dbb049abf0d677abbd7f7eee0375145b417fdd34 # v2.2.0
- name: Checkout Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
if: ${{ steps.dependabot-metadata.outputs.package-ecosystem == 'go_modules' && contains(steps.dependabot-metadata.outputs.dependency-names, 'hugo') }}
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.NGINX_PAT }}
- name: Setup Hugo
uses: peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f # v3.0.0
if: ${{ steps.dependabot-metadata.outputs.package-ecosystem == 'go_modules' && contains(steps.dependabot-metadata.outputs.dependency-names, 'hugo') }}
- name: Run build
if: ${{ steps.dependabot-metadata.outputs.package-ecosystem == 'go_modules' && contains(steps.dependabot-metadata.outputs.dependency-names, 'hugo') }}
working-directory: site
run: |
hugo mod tidy
hugo mod verify
- name: Commit changes
if: ${{ steps.dependabot-metadata.outputs.package-ecosystem == 'go_modules' && contains(steps.dependabot-metadata.outputs.dependency-names, 'hugo') }}
id: commit
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
with:
commit_message: "Update docs go.mod"