Skip to content

Commit

Permalink
Bring dependabot update action to release branch (#1141)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsimansk authored Jan 31, 2025
1 parent 5124831 commit dc190a8
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/dependabot-deps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

name: Dependabot

on:
pull_request:

permissions:
contents: write

jobs:
update-deps:
name: Update deps
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
path: ./src/github.com/${{ github.repository }}
fetch-depth: 0

- name: Setup Golang
uses: openshift-knative/hack/actions/setup-go@main

- name: Install yq
run: |
go install github.com/mikefarah/yq/v3@latest
- name: Generate files
working-directory: ./src/github.com/${{ github.repository }}
run: make generate-release

- name: git push
working-directory: ./src/github.com/${{ github.repository }}
run: |
if ! git diff --exit-code --quiet
then
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit -m "Run generate release"
git push
fi

0 comments on commit dc190a8

Please sign in to comment.