Skip to content

build(deps): bump coverage from 7.13.4 to 7.13.5 #203

build(deps): bump coverage from 7.13.4 to 7.13.5

build(deps): bump coverage from 7.13.4 to 7.13.5 #203

Workflow file for this run

name: Sync .bazelversion with Dockerfile
on:
pull_request:
jobs:
update-bazelversion:
if: github.actor == 'dependabot[bot]'
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout PR
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.head_ref }}
- name: Extract Bazel version from Dockerfile
id: extract_version
run: |
version=$(grep -oP '(?<=gcr.io/bazel-public/bazel:)[0-9]+\.[0-9]+\.[0-9]+' Dockerfile)
echo "bazel_version=$version" >> $GITHUB_OUTPUT
- name: Update .bazelversion if different
run: |
current_version=$(head -n1 .bazelversion | tr -d '[:space:]')
if [ "$current_version" != "${{ steps.extract_version.outputs.bazel_version }}" ]; then
echo "${{ steps.extract_version.outputs.bazel_version }}" > .bazelversion
echo "# make sure that the image in the Dockerfile and this version are identical" >> .bazelversion
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .bazelversion
git commit -m "chore: sync .bazelversion with Dockerfile"
git push origin ${{ github.head_ref }}
else
echo ".bazelversion is already up to date."
fi