Skip to content

fix: pass RABBITMQ_IMAGE env var through turbo to integration tests #164

fix: pass RABBITMQ_IMAGE env var through turbo to integration tests

fix: pass RABBITMQ_IMAGE env var through turbo to integration tests #164

name: Dependabot Auto-Merge

Check failure on line 1 in .github/workflows/dependabot-auto-merge.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/dependabot-auto-merge.yml

Invalid workflow file

(Line: 17, Col: 9): Unrecognized function: 'length'. Located at position 169 within expression: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.actor.login == 'dependabot[bot]' && length(github.event.workflow_run.pull_requests) > 0
permissions:
contents: write
pull-requests: write
on:
workflow_run:
workflows: ["CI"]
types:
- completed
jobs:
auto-merge:
name: Auto-merge Dependabot PRs
runs-on: ubuntu-latest
if: |
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.actor.login == 'dependabot[bot]' &&
length(github.event.workflow_run.pull_requests) > 0
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Get PR number
id: pr
run: |
# Get the PR number directly from the workflow run payload
PR_NUMBER="${{ github.event.workflow_run.pull_requests[0].number }}"
if [ -z "$PR_NUMBER" ]; then
echo "No PR found for workflow run on branch ${{ github.event.workflow_run.head_branch }}"
exit 0
fi
echo "number=$PR_NUMBER" >> "$GITHUB_OUTPUT"
echo "Found PR #$PR_NUMBER"
- name: Approve PR
if: steps.pr.outputs.number != ''
run: |
echo "Approving PR #${{ steps.pr.outputs.number }}"
gh pr review "${{ steps.pr.outputs.number }}" --approve --body "Auto-approving Dependabot PR after successful CI run"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Enable auto-merge
if: steps.pr.outputs.number != ''
run: |
echo "Enabling auto-merge for PR #${{ steps.pr.outputs.number }}"
gh pr merge "${{ steps.pr.outputs.number }}" --auto --squash --delete-branch
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}