Like Prometheus, but for logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
loki/.github/workflows/operator-check-prepare-rele...

58 lines
1.8 KiB

name: operator-check-prepare-release-commit
on:
pull_request:
paths:
- 'operator/**'
branches:
- main
permissions:
contents: read
jobs:
check-commit:
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
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: Generate GitHub App Token
id: app-token
uses: grafana/shared-workflows/actions/create-github-app-token@ae92934a14a48b94494dbc06d74a81d47fe08a40 # create-github-app-token/v0.2.2
with:
github_app: loki-gh-app
- 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: main
path: "release"
persist-credentials: false
- name: Check main commits for prepare release commit
id: check_commit
env:
GH_TOKEN: "${{ steps.app-token.outputs.token }}"
OUTPUTS_SEMVER: ${{ steps.pr_semver.outputs.semver }}
working-directory: "release"
run: |
COMMIT=$(gh search commits "chore(operator): Prepare community release v${OUTPUTS_SEMVER}")
if [ -n "$COMMIT" ]; then
echo "Prepare release commit found."
else
echo "No prepare release commit found for the release version $OUTPUTS_SEMVER"
exit 1
fi