knative.dev/pkg@v0.0.0-20260602142205-ac97e43f6622/.github/workflows/knative-dependabot.yaml (about)

     1  name: update-dependabot
     2  
     3  on:
     4    push:
     5      branches:
     6        - dependabot/**
     7    pull_request:
     8      branches:
     9        - dependabot/**
    10  
    11  permissions:
    12    contents: write
    13  
    14  jobs:
    15    generate_some_code:
    16      name: update deps
    17      runs-on: ubuntu-latest
    18      if: ${{ github.actor == 'dependabot[bot]' }}
    19      steps:
    20        - name: Set up Go
    21          uses: knative/actions/setup-go@main
    22  
    23        - name: Checkout
    24          uses: actions/checkout@v6
    25          with:
    26            ref: ${{ github.head_ref }}
    27            path: ./src/github.com/${{ github.repository }}
    28            fetch-depth: 0
    29  
    30        - name: Run hack scripts
    31          working-directory: ./src/github.com/${{ github.repository }}
    32          run: |
    33            ./hack/update-deps.sh
    34            ./hack/update-codegen.sh
    35  
    36        - name: git push
    37          working-directory: ./src/github.com/${{ github.repository }}
    38          run: |
    39            if ! git diff --exit-code --quiet
    40            then
    41              git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
    42              git config --local user.name "github-actions[bot]"
    43              git add .
    44              git commit -m "Run ./hack/update-codegen.sh"
    45              git push
    46            fi