diff --git a/.github/mergify.yml b/.github/mergify.yml index 9e715eb3..a1a40cf2 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -1,17 +1,25 @@ queue_rules: - name: default conditions: - - label=ci:mergify + - base=main + - label=ci:ready_to_merge pull_request_rules: - name: push to default merge queue conditions: - base=main - - label=ci:mergify - - check-success=cla/google + - label=ci:ready_to_merge actions: queue: name: default require_branch_protection: true method: squash + + - name: remove ci:ready_to_merge label + conditions: + - merged + actions: + label: + remove: + - ci:ready_to_merge diff --git a/.github/workflows/apply_cirun.yml b/.github/workflows/apply_cirun.yml new file mode 100644 index 00000000..c6db43f0 --- /dev/null +++ b/.github/workflows/apply_cirun.yml @@ -0,0 +1,19 @@ +on: + pull_request_target: + types: [synchronize] + +jobs: + apply-label: + runs-on: ubuntu-latest + if: contains(github.event.pull_request.labels.*.name, 'ci:ready_to_merge') + steps: + - uses: actions/github-script@v5 + with: + github-token: ${{ secrets.TFLM_BOT_REPO_TOKEN }} + script: | + github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ['ci:run'] + })