Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/merge-bot-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
merge-codegen:
name: Merge codegen pull request job
runs-on: ubuntu-latest
if: github.actor == 'ptr727' && github.event.pull_request.user.login == 'ptr727' && github.event.pull_request.head.ref == 'codegen' && github.event.pull_request.base.ref == 'main' && github.event.pull_request.head.repo.full_name == github.repository
if: github.event.pull_request.user.login == 'github-actions[bot]' && github.event.pull_request.head.ref == 'codegen' && github.event.pull_request.base.ref == 'main' && github.event.pull_request.head.repo.full_name == github.repository && ((github.event.action == 'reopened' && github.actor == 'ptr727') || (github.event.action != 'reopened' && github.actor == 'github-actions[bot]'))
permissions:
contents: write
pull-requests: write
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/run-codegen-pull-request-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
codegen:
name: Run codegen and pull request job
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

steps:

Expand Down Expand Up @@ -38,12 +41,22 @@ jobs:

- name: Create pull request step
uses: peter-evans/create-pull-request@v8
id: cpr
with:
token: ${{ secrets.WORKFLOW_PAT }}
token: ${{ secrets.GITHUB_TOKEN }}
base: main
branch: codegen
title: 'Update codegen files'
body: 'This PR updates the codegen files.'
commit-message: 'Update codegen files'
delete-branch: true
sign-commits: true

- name: Trigger PR workflows step
if: steps.cpr.outputs.pull-request-number != ''
run: |
PR="${{ steps.cpr.outputs.pull-request-number }}"
gh pr close "$PR"
gh pr reopen "$PR"
env:
GH_TOKEN: ${{ secrets.WORKFLOW_PAT }}