Skip to content

Commit

Permalink
chore: debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameron Meissner committed Sep 26, 2024
1 parent a1f1dc5 commit 22551fa
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions .github/workflows/generate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,30 @@ on: pull_request

jobs:
auto-generate:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v3
with:
go-version: '1.22'

- name: make generate
run: make generate

- name: commit and push generated changes
- name: Checkout PR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh pr checkout ${{ github.event.pull_request.number }}

- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
make generate
if [ -n "$(git status --porcelain)" ]; then
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "chore: auto-generate"
git push origin HEAD:${{ github.head_ref }}
else
echo "no changes to commit and push"
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "chore: auto-generate"
git push

0 comments on commit 22551fa

Please sign in to comment.