Skip to content

feat(operator): Enable leader-election #138

feat(operator): Enable leader-election

feat(operator): Enable leader-election #138

name: operator-check-prepare-release-commit
on:
pull_request:
paths:
- 'operator/**'
branches:
- main
jobs:
check-commit:
runs-on: ubuntu-latest
if: |
github.event.pull_request.head.ref == 'release-please--branches--main--components--operator' &&
contains(github.event.pull_request.title, 'chore( operator): community release')
steps:
- name: Extract release version
id: pr_semver
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
SEMVER=$(echo "$PR_TITLE" | sed -n 's/^chore( operator): community release \([0-9]\+\.[0-9]\+\.[0-9]\+\)$/\1/p')
echo "semver=$SEMVER" >> $GITHUB_OUTPUT
- name: Checkout code
uses: actions/checkout@v4
with:
ref: main
path: "release"
- name: Check main commits for prepare release commit
id: check_commit
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
working-directory: "release"
run: |
COMMIT=$(gh search commits "chore(operator): prepare community release v${{ steps.pr_semver.outputs.semver }}")
if [ -n "$COMMIT" ]; then
echo "Prepare release commit found."
else
echo "No prepare release commit found for the release version ${{ steps.pr_semver.outputs.semver }}"
exit 1
fi