Skip to content

feat(load-generator): replace Locust with k6 #4100

feat(load-generator): replace Locust with k6

feat(load-generator): replace Locust with k6 #4100

# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
name: Dependabot auto-update protobuf diff
on:
pull_request_target: # zizmor: ignore[dangerous-triggers] restricted to Dependabot PRs and pushes only generated protobuf updates
branches: [ main ]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: false
jobs:
dependabot-auto-update-protobuf-diff:
name: Update protobuf diff
permissions:
contents: write # required to push generated protobuf updates
pull-requests: write # required to update Dependabot PR branches
runs-on: ubuntu-latest
# Only run this job if the PR is opened by dependabot and the last commit is from dependabot
if: github.event.pull_request.user.login == 'dependabot[bot]'
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.DEPENDABOT_TOKEN }}
persist-credentials: false
- name: Generate
run: make clean docker-generate-protobuf
- name: Commit only if there are changes
env:
BRANCH_NAME: ${{ github.head_ref }}
DEPENDABOT_TOKEN: ${{ secrets.DEPENDABOT_TOKEN }}
run: |
if ! git diff --quiet; then
git config user.name "dependabot[bot]"
git config user.email "49699333+dependabot[bot]@users.noreply.github.com"
git add .
git commit -s -m "chore: update protobuf"
AUTH_HEADER=$(printf 'x-access-token:%s' "${DEPENDABOT_TOKEN}" | base64 -w 0)
git -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${AUTH_HEADER}" push origin "HEAD:${BRANCH_NAME}"
fi