sigs.k8s.io/cluster-api@v1.7.1/.github/workflows/pr-dependabot.yaml (about)

     1  name: PR dependabot code generation and go modules fix
     2  
     3  # This action runs on other PRs opened by dependabot. It updates modules and generated code on PRs opened by dependabot.
     4  on:
     5    pull_request:
     6      branches:
     7        - dependabot/**
     8    push:
     9      branches:
    10        - dependabot/**
    11    workflow_dispatch:
    12  
    13  permissions:
    14    contents: write # Allow to update the PR.
    15  
    16  jobs:
    17    build:
    18      name: Build
    19      runs-on: ubuntu-latest
    20      steps:
    21      - name: Check out code into the Go module directory
    22        uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # tag=v4.1.2
    23      - name: Calculate go version
    24        id: vars
    25        run: echo "go_version=$(make go-version)" >> $GITHUB_OUTPUT
    26      - name: Set up Go
    27        uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # tag=v5.0.0
    28        with:
    29          go-version: ${{ steps.vars.outputs.go_version }}
    30      - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # tag=v4.0.2
    31        name: Restore go cache
    32        with:
    33          path: |
    34            ~/.cache/go-build
    35            ~/go/pkg/mod
    36          key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
    37          restore-keys: |
    38            ${{ runner.os }}-go-
    39      - name: Update all modules
    40        run: make generate-modules
    41      - name: Update generated code
    42        run: make generate
    43      - uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # tag=v9.1.4
    44        name: Commit changes
    45        with:
    46          author_name: dependabot[bot]
    47          author_email: 49699333+dependabot[bot]@users.noreply.github.com
    48          default_author: github_actor
    49          message: 'Update generated code'